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/test/org/apache/myrmidon/components/configurer/test DefaultConfigurerTestCase.java
Date Sun, 07 Apr 2002 02:11:29 GMT
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:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message