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 ConfigTest9.java DefaultConfigurerTest.java
Date Mon, 28 Jan 2002 00:55:38 GMT
donaldp     02/01/27 16:55:38

  Modified:    proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer
                        DefaultConfigurerTest.java
  Added:       proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer
                        ConfigTest9.java
  Log:
  Test Configurable objects are handled correctly
  
  Revision  Changes    Path
  1.6       +19 -0     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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultConfigurerTest.java	28 Jan 2002 00:49:13 -0000	1.5
  +++ DefaultConfigurerTest.java	28 Jan 2002 00:55:38 -0000	1.6
  @@ -496,6 +496,25 @@
       }
   
       /**
  +     * Tests to see if typed adder works.
  +     */
  +    public void testConfigable()
  +        throws Exception
  +    {
  +        // Setup test data
  +        final DefaultConfiguration config = new DefaultConfiguration( "test", "test" );
  +
  +        final ConfigTest9 test = new ConfigTest9();
  +
  +        // Configure the object
  +        m_configurer.configure( test, config, m_context );
  +
  +        final ConfigTest9 expected = new ConfigTest9();
  +        expected.configure( config );
  +        assertEquals( expected, test );
  +    }
  +
  +    /**
        * Test resolving properties in an id.
        */
       public void testIdResolve()
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/ConfigTest9.java
  
  Index: ConfigTest9.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included  with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.myrmidon.components.configurer;
  
  import java.util.ArrayList;
  import junit.framework.AssertionFailedError;
  import org.apache.avalon.framework.configuration.Configuration;
  import org.apache.avalon.framework.configuration.Configurable;
  import org.apache.avalon.framework.configuration.ConfigurationException;
  
  /**
   * Simple class to test adder for Configurations.
   *
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   * @version $Revision: 1.1 $ $Date: 2002/01/28 00:55:38 $
   */
  public class ConfigTest9
      implements Configurable
  {
      private Configuration m_configuration;
  
      public void configure( Configuration configuration )
          throws ConfigurationException
      {
          m_configuration = configuration;
      }
  
      public boolean equals( final Object object )
      {
          final ConfigTest9 other = (ConfigTest9)object;
          return m_configuration == other.m_configuration;
      }
  }
  
  
  

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