ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/deployer DefaultDeployerTest.java
Date Sun, 03 Feb 2002 03:50:43 GMT
donaldp     02/02/02 19:50:43

  Modified:    proposal/myrmidon/src/testcases/org/apache/myrmidon/components/deployer
                        DefaultDeployerTest.java
  Log:
  Update test to correct bug introduced
  
  Revision  Changes    Path
  1.4       +8 -4      jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/deployer/DefaultDeployerTest.java
  
  Index: DefaultDeployerTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/deployer/DefaultDeployerTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultDeployerTest.java	3 Feb 2002 03:46:13 -0000	1.3
  +++ DefaultDeployerTest.java	3 Feb 2002 03:50:43 -0000	1.4
  @@ -47,13 +47,16 @@
        */
       public void testSingleType() throws Exception
       {
  +        final String roleName = "data-type";
  +        final String typeName = "test-type1";
  +        final String classname = TestType1.class.getName();
  +
           // Determine the shorthand for the DataType role
           final RoleManager roleManager = (RoleManager)getComponentManager().lookup( RoleManager.ROLE
);
  -        roleManager.addNameRoleMapping( "data-type", DataType.ROLE );
  +        roleManager.addNameRoleMapping( roleName, DataType.ROLE );
   
           // Create the type definition
  -        final String destType = TestType1.class.getName();
  -        final TypeDefinition typeDef =  new TypeDefinition( "data-type", "test-type1",
destType );
  +        final TypeDefinition typeDef =  new TypeDefinition( typeName, roleName, classname
);
   
           // Deploy the type
           final ClassLoader classLoader = getClass().getClassLoader();
  @@ -62,7 +65,7 @@
   
           // Create an instance
           final TypeFactory typeFactory = getTypeManager().getFactory( DataType.class );
  -        final Object result = typeFactory.create( "test-type1" );
  +        final Object result = typeFactory.create( typeName );
   
           // Check the type
           assertTrue( result instanceof TestType1 );
  @@ -77,6 +80,7 @@
           final String classname = TestConverter1.class.getName();
           final String source = "java.lang.String";
           final String destClass = TestType1.class.getName();
  +
           final ConverterDefinition typeDef =
               new ConverterDefinition( classname, source, destClass );
   
  
  
  

--
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