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/configurer DefaultConfigurerTest.java
Date Fri, 25 Jan 2002 11:23:22 GMT
donaldp     02/01/25 03:23:22

  Modified:    proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer
                        DefaultConfigurerTest.java
  Log:
  Updated test case to reflect latest changes
  
  Submitted By: "Adam Murdoch" <adammurdoch_ml@yahoo.com>
  
  Revision  Changes    Path
  1.2       +14 -10    jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java
  
  Index: DefaultConfigurerTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultConfigurerTest.java	22 Jan 2002 11:16:02 -0000	1.1
  +++ DefaultConfigurerTest.java	25 Jan 2002 11:23:21 -0000	1.2
  @@ -101,13 +101,17 @@
           m_componentManager.put( Configurer.ROLE, component );
           components.add( component );
   
  +        // Setup a context
  +        m_context = new DefaultTaskContext();
  +        components.add( m_context );
  +
           // Log enable the components
           for( Iterator iterator = components.iterator(); iterator.hasNext(); )
           {
  -            component = (Component)iterator.next();
  -            if( component instanceof LogEnabled )
  +            Object obj = iterator.next();
  +            if( obj instanceof LogEnabled )
               {
  -                final LogEnabled logEnabled = (LogEnabled)component;
  +                final LogEnabled logEnabled = (LogEnabled)obj;
                   logEnabled.enableLogging( m_logger );
               }
           }
  @@ -115,21 +119,21 @@
           // Compose the components
           for( Iterator iterator = components.iterator(); iterator.hasNext(); )
           {
  -            component = (Component)iterator.next();
  -            if( component instanceof Composable )
  +            Object obj = iterator.next();
  +            if( obj instanceof Composable )
               {
  -                final Composable composable = (Composable)component;
  +                final Composable composable = (Composable)obj;
                   composable.compose( m_componentManager );
               }
           }
   
  +        // Configure the context
  +        final File baseDir = new File( "." ).getAbsoluteFile();
  +        m_context.setProperty( TaskContext.BASE_DIRECTORY, baseDir );
  +
           // Find the configurer
           m_configurer = (Configurer)m_componentManager.lookup( Configurer.ROLE );
   
  -        // Setup a context
  -        m_context = new DefaultTaskContext();
  -        final File baseDir = new File( "." ).getAbsoluteFile();
  -        m_context.setProperty( TaskContext.BASE_DIRECTORY, baseDir );
       }
   
       /**
  
  
  

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