ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/deployer/test DefaultDeployerTestCase.java
Date Fri, 17 May 2002 07:43:47 GMT
adammurdoch    02/05/17 00:43:47

  Modified:    container/src/test/org/apache/myrmidon/components
                        AbstractComponentTest.java
               container/src/test/org/apache/myrmidon/components/builder/test
                        DefaultProjectBuilderTestCase.java
               container/src/test/org/apache/myrmidon/components/configurer/test
                        DefaultConfigurerTestCase.java
               container/src/test/org/apache/myrmidon/components/deployer/test
                        DefaultDeployerTestCase.java
  Log:
  Don't register 'data-type' role for component test.
  
  Revision  Changes    Path
  1.37      +14 -5     jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/AbstractComponentTest.java
  
  Index: AbstractComponentTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/AbstractComponentTest.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- AbstractComponentTest.java	12 May 2002 12:57:54 -0000	1.36
  +++ AbstractComponentTest.java	17 May 2002 07:43:47 -0000	1.37
  @@ -58,7 +58,7 @@
    * A base class for tests for the default components.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.36 $ $Date: 2002/05/12 12:57:54 $
  + * @version $Revision: 1.37 $ $Date: 2002/05/17 07:43:47 $
    */
   public abstract class AbstractComponentTest
       extends AbstractContainerTestCase
  @@ -173,7 +173,6 @@
               // Register some standard roles
               // Add some core roles
               final RoleRegistry roleRegistry = (RoleRegistry)getServiceManager().lookup(
RoleRegistry.ROLE );
  -            roleRegistry.addRole( new RoleInfo( TestDataType.ROLE, TestDataType.class )
);
               roleRegistry.addRole( new RoleInfo( Converter.ROLE, Converter.class ) );
               roleRegistry.addRole( new RoleInfo( ServiceFactory.ROLE, ServiceFactory.class
) );
           }
  @@ -221,6 +220,18 @@
       protected TaskContext createContext()
           throws Exception
       {
  +        ExecutionFrame frame = createExecutionFrame();
  +
  +        final TaskContext context =
  +            new DefaultTaskContext( frame, "test", "gen:///test:0:0" );
  +        return context;
  +    }
  +
  +    /**
  +     * Utility method to create an execution frame.
  +     */
  +    protected ExecutionFrame createExecutionFrame() throws Exception
  +    {
           final ServiceManager serviceManager = getServiceManager();
           final TaskEventManager eventManager = (TaskEventManager)serviceManager.lookup(
TaskEventManager.ROLE );
   
  @@ -228,9 +239,7 @@
           final File baseDir = getTestDirectory();
           final ExecutionFrame frame =
               new DefaultExecutionFrame( "", baseDir, getLogger(), store, serviceManager,
eventManager );
  -        final TaskContext context =
  -            new DefaultTaskContext( frame, "test", "gen:///test:0:0" );
  -        return context;
  +        return frame;
       }
   
       /**
  
  
  
  1.6       +2 -2      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/builder/test/DefaultProjectBuilderTestCase.java
  
  Index: DefaultProjectBuilderTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/builder/test/DefaultProjectBuilderTestCase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultProjectBuilderTestCase.java	12 May 2002 11:18:39 -0000	1.5
  +++ DefaultProjectBuilderTestCase.java	17 May 2002 07:43:47 -0000	1.6
  @@ -18,10 +18,10 @@
   import org.apache.myrmidon.interfaces.oldmodel.Project;
   
   /**
  - * Test cases for {@link org.apache.myrmidon.components.builder.DefaultProjectBuilder}.
  + * Test cases for {@link DefaultProjectBuilder}.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.5 $ $Date: 2002/05/12 11:18:39 $
  + * @version $Revision: 1.6 $ $Date: 2002/05/17 07:43:47 $
    */
   public class DefaultProjectBuilderTestCase
       extends AbstractContainerTestCase
  
  
  
  1.16      +2 -0      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/DefaultConfigurerTestCase.java
  
  Index: DefaultConfigurerTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/DefaultConfigurerTestCase.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DefaultConfigurerTestCase.java	6 May 2002 09:29:44 -0000	1.15
  +++ DefaultConfigurerTestCase.java	17 May 2002 07:43:47 -0000	1.16
  @@ -498,6 +498,7 @@
           // Register incompatible types with the same name, as data-type and myrole1.
           registerRole( new RoleInfo( "myrole1", MyRole1.class ) );
           registerType( "myrole1", "my-type1", MyType1.class );
  +        registerRole( new RoleInfo( TestDataType.ROLE, TestDataType.class) );
           registerType( TestDataType.ROLE, "my-type1", StringBuffer.class );
   
           final ConfigTestTypedAdderRole test = new ConfigTestTypedAdderRole();
  @@ -525,6 +526,7 @@
           child.setAttribute( "prop", "some value" );
           config.addChild( child );
   
  +        registerRole( new RoleInfo( TestDataType.ROLE, TestDataType.class) );
           registerType( TestDataType.ROLE, "some-type", ConfigTestTypedAdderConversion.class
);
           registerConverter( ObjectToMyRole1Converter.class, Object.class, MyRole1.class
);
   
  
  
  
  1.10      +3 -0      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/deployer/test/DefaultDeployerTestCase.java
  
  Index: DefaultDeployerTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/deployer/test/DefaultDeployerTestCase.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DefaultDeployerTestCase.java	12 May 2002 12:57:54 -0000	1.9
  +++ DefaultDeployerTestCase.java	17 May 2002 07:43:47 -0000	1.10
  @@ -22,6 +22,7 @@
   import org.apache.myrmidon.interfaces.type.TypeException;
   import org.apache.myrmidon.interfaces.type.TypeFactory;
   import org.apache.myrmidon.interfaces.type.TypeManager;
  +import org.apache.myrmidon.interfaces.role.RoleInfo;
   
   /**
    * Test cases for the default deployer.
  @@ -77,6 +78,8 @@
       private TypeLibraryDeployer getTestDeployer()
           throws Exception
       {
  +        registerRole( new RoleInfo( TestDataType.ROLE, TestDataType.class ) );
  +
           final File file = getTestResource( "test.atl" );
           final LibraryManager libraryManager = (LibraryManager)getServiceManager().lookup(
LibraryManager.ROLE );
           final Library library = libraryManager.createLibrary( new File[] { file } );
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message