You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2002/04/07 04:11:29 UTC

cvs commit: jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/test DefaultConfigurerTestCase.java

donaldp     02/04/06 18:11:29

  Modified:    proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/test
                        DefaultConfigurerTestCase.java
  Log:
  Bring testcases back into line with removal of -ref pattern from attributes
  
  Revision  Changes    Path
  1.6       +48 -14    jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/test/DefaultConfigurerTestCase.java
  
  Index: DefaultConfigurerTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/test/DefaultConfigurerTestCase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultConfigurerTestCase.java	7 Apr 2002 02:00:55 -0000	1.5
  +++ DefaultConfigurerTestCase.java	7 Apr 2002 02:11:29 -0000	1.6
  @@ -317,12 +317,22 @@
           m_context.setProperty( "prop-a", "some value" );
   
           // Configure the object
  -        configure( test, config );
  +        try
  +        {
  +            configure( test, config );
  +        }
  +        catch( ConfigurationException e )
  +        {
  +            //Expected to fail as -ref no longer supported
  +            //pattern for attributes
  +            return;
  +        }
   
  +        fail( "-ref pattern on attributes no longer supported" );
           // Check the configured object
  -        final ConfigTestReferenceAttribute expected = new ConfigTestReferenceAttribute();
  -        expected.setSomeProp( "some value" );
  -        assertEquals( expected, test );
  +        //final ConfigTestReferenceAttribute expected = new ConfigTestReferenceAttribute();
  +        //expected.setSomeProp( "some value" );
  +        //assertEquals( expected, test );
       }
   
       /**
  @@ -398,12 +408,22 @@
           final ConfigTestReferenceConversion test = new ConfigTestReferenceConversion();
   
           // Configure
  -        configure( test, config );
  +        try
  +        {
  +            configure( test, config );
  +        }
  +        catch( ConfigurationException e )
  +        {
  +            //Good should no longer work
  +            return;
  +        }
  +
  +        fail( "-ref pattern on attributes no longer supported" );
   
           // Check result
  -        final ConfigTestReferenceConversion expected = new ConfigTestReferenceConversion();
  -        expected.setPropA( new MyRole1Adaptor( refValue ) );
  -        assertEquals( expected, test );
  +        //final ConfigTestReferenceConversion expected = new ConfigTestReferenceConversion();
  +        //expected.setPropA( new MyRole1Adaptor( refValue ) );
  +        //assertEquals( expected, test );
       }
   
       /**
  @@ -658,20 +678,31 @@
           m_context.setProperty( "prop-a", "some indirect value" );
   
           // Configure the object
  -        configure( test, config );
  +        try
  +        {
  +            configure( test, config );
  +        }
  +        catch( ConfigurationException e )
  +        {
  +            return;
  +        }
   
  +        fail( "-ref pattern on attributes no longer supported" );
           // Check the configured object
  -        final ConfigTestIdResolve expected = new ConfigTestIdResolve();
  -        expected.setSomeProp( "some indirect value" );
  -        assertEquals( expected, test );
  +        //final ConfigTestIdResolve expected = new ConfigTestIdResolve();
  +        //expected.setSomeProp( "some indirect value" );
  +        //assertEquals( expected, test );
       }
   
       /**
        * Tests an unknown reference.
        */
  -    public void testUnknownReference()
  +    public void __testUnknownReference()
           throws Exception
       {
  +        //Should rework
  +        fail( "-ref pattern on attributes no longer supported" );
  +
           // Setup test data
           final DefaultConfiguration config = new DefaultConfiguration( "test", "test" );
           config.setAttribute( "some-prop-ref", "unknown-prop" );
  @@ -698,9 +729,12 @@
       /**
        * Tests handling of mismatched reference type.
        */
  -    public void testMismatchedRefType()
  +    public void __testMismatchedRefType()
           throws Exception
       {
  +        //FIXME: rework testcase
  +        fail( "-ref pattern on attributes no longer supported" );
  +
           // Setup test data
           final DefaultConfiguration config = new DefaultConfiguration( "test", "test" );
           config.setAttribute( "some-prop-ref", "prop-a" );
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>