Browse Source

Commit new "data" classes to use during testing.

One class per test


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271749 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
37b2e99006
42 changed files with 1580 additions and 0 deletions
  1. +46
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestAttributeConvert.java
  2. +42
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestContent.java
  3. +22
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestEmpty.java
  4. +42
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestIdResolve.java
  5. +67
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestIgnoreStringMethods.java
  6. +33
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestInterfaceAdder.java
  7. +26
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestMismatchedRefType.java
  8. +28
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestMultipleTypedAdder.java
  9. +23
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestNonInterfaceAdder.java
  10. +41
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestPropResolution.java
  11. +41
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestReferenceAttribute.java
  12. +35
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestReferenceConversion.java
  13. +37
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestReferenceElement.java
  14. +51
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestSetAttribute.java
  15. +57
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestSetElement.java
  16. +34
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdder.java
  17. +40
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdderConversion.java
  18. +33
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdderReference.java
  19. +33
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdderRole.java
  20. +33
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestTypedConfigAdder.java
  21. +26
    -0
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestUnknownReference.java
  22. +46
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestAttributeConvert.java
  23. +42
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestContent.java
  24. +22
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestEmpty.java
  25. +42
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestIdResolve.java
  26. +67
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestIgnoreStringMethods.java
  27. +33
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestInterfaceAdder.java
  28. +26
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestMismatchedRefType.java
  29. +28
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestMultipleTypedAdder.java
  30. +23
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestNonInterfaceAdder.java
  31. +41
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestPropResolution.java
  32. +41
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestReferenceAttribute.java
  33. +35
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestReferenceConversion.java
  34. +37
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestReferenceElement.java
  35. +51
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestSetAttribute.java
  36. +57
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestSetElement.java
  37. +34
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdder.java
  38. +40
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdderConversion.java
  39. +33
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdderReference.java
  40. +33
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdderRole.java
  41. +33
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestTypedConfigAdder.java
  42. +26
    -0
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestUnknownReference.java

+ 46
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestAttributeConvert.java View File

@@ -0,0 +1,46 @@
/*
* 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.data;

import org.apache.myrmidon.components.AbstractComponentTest;

/**
* A class for testing conversion.
*
* @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
*/
public class ConfigTestAttributeConvert
{
private int m_intProp;
private Integer m_integerProp;

public void setIntProp( final int intProp )
{
m_intProp = intProp;
}

public void setIntegerProp( final Integer integerProp )
{
m_integerProp = integerProp;
}

public boolean equals( Object obj )
{
ConfigTestAttributeConvert test = (ConfigTestAttributeConvert)obj;
if( m_intProp != test.m_intProp )
{
return false;
}
if( !AbstractComponentTest.equals( m_integerProp, test.m_integerProp ) )
{
return false;
}

return true;
}
}

+ 42
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestContent.java View File

@@ -0,0 +1,42 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.framework.DataType;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* A simple test class with string properties.
*
* @author Adam Murdoch
*/
public class ConfigTestContent
implements DataType
{
private String m_content;

public boolean equals( final Object obj )
{
final ConfigTestContent test = (ConfigTestContent)obj;
if( !DefaultConfigurerTest.equals( m_content, test.m_content ) )
{
return false;
}
else
{
return true;
}
}

public void addContent( final String content )
{
m_content = content;
}
}

+ 22
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestEmpty.java View File

@@ -0,0 +1,22 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.framework.DataType;

/**
* A simple test class with string properties.
*
* @author Adam Murdoch
*/
public class ConfigTestEmpty
implements DataType
{
}

+ 42
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestIdResolve.java View File

@@ -0,0 +1,42 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.framework.DataType;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* A simple test class with string properties.
*
* @author Adam Murdoch
*/
public class ConfigTestIdResolve
implements DataType
{
private String m_someProp;

public boolean equals( final Object obj )
{
final ConfigTestIdResolve test = (ConfigTestIdResolve)obj;
if( !DefaultConfigurerTest.equals( m_someProp, test.m_someProp ) )
{
return false;
}
else
{
return true;
}
}

public void setSomeProp( final String value )
{
m_someProp = value;
}
}

+ 67
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestIgnoreStringMethods.java View File

@@ -0,0 +1,67 @@
/*
* 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.data;

import java.util.ArrayList;
import junit.framework.AssertionFailedError;
import org.apache.myrmidon.components.configurer.ConfigTestStringProps;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;
import org.apache.myrmidon.components.configurer.ConfigTestMultiSetter;

/**
* A test class with multiple setters/adders/creators for a property.
*
* @author Adam Murdoch
*/
public class ConfigTestIgnoreStringMethods
{
private ConfigTestIgnoreStringMethods m_prop1;
private ArrayList m_prop2 = new ArrayList();

public boolean equals( Object obj )
{
ConfigTestIgnoreStringMethods test = (ConfigTestIgnoreStringMethods)obj;
if( !DefaultConfigurerTest.equals( m_prop1, test.m_prop1 ) )
{
return false;
}
if( !m_prop2.equals( test.m_prop2 ) )
{
return false;
}
return true;
}

//
// Multiple setters
//

public void addProp1( final String value )
{
throw new AssertionFailedError();
}

public void addProp1( final ConfigTestIgnoreStringMethods value )
{
m_prop1 = value;
}

//
// Multiple Adders
//

public void addProp2( final String value )
{
throw new AssertionFailedError();
}

public void addProp2( final ConfigTestIgnoreStringMethods value )
{
m_prop2.add( value );
}
}

+ 33
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestInterfaceAdder.java View File

@@ -0,0 +1,33 @@
/*
* 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.data;

import java.util.ArrayList;
import org.apache.myrmidon.components.configurer.MyRole1;

/**
* A test class with an interface property.
*
* @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
* @version $Revision$ $Date$
*/
public class ConfigTestInterfaceAdder
{
private final ArrayList m_elems = new ArrayList();

public void addPropA( final MyRole1 role1 )
{
m_elems.add( role1 );
}

public boolean equals( Object obj )
{
final ConfigTestInterfaceAdder test = (ConfigTestInterfaceAdder)obj;
return m_elems.equals( test.m_elems );
}
}

+ 26
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestMismatchedRefType.java View File

@@ -0,0 +1,26 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.framework.DataType;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* A simple test class with string properties.
*
* @author Adam Murdoch
*/
public class ConfigTestMismatchedRefType
implements DataType
{
public void setSomeProp( final String value )
{
}
}

+ 28
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestMultipleTypedAdder.java View File

@@ -0,0 +1,28 @@
/*
* 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.data;

import org.apache.myrmidon.components.configurer.MyRole1;
import org.apache.myrmidon.components.configurer.MyRole2;

/**
* Simple class with more than one typed adder method.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestMultipleTypedAdder
{
public void add( final MyRole1 role1 )
{
}

public void add( final MyRole2 role2 )
{
}
}

+ 23
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestNonInterfaceAdder.java View File

@@ -0,0 +1,23 @@
/*
* 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.data;

/**
* Simple class to test typed adder.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestNonInterfaceAdder
{
public void add( final Integer integer )
{
System.out.println( "This should not have been called as " +
"Integer is not an interface" );
}
}

+ 41
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestPropResolution.java View File

@@ -0,0 +1,41 @@
/*
* 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.data;

import java.util.List;
import java.util.ArrayList;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* Simple class to test typed adder.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestPropResolution
{
private String m_prop;

public boolean equals( final Object obj )
{
final ConfigTestPropResolution test = (ConfigTestPropResolution)obj;
if( !DefaultConfigurerTest.equals( m_prop, test.m_prop ) )
{
return false;
}
else
{
return true;
}
}

public void setProp( final String value )
{
m_prop = value;
}
}

+ 41
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestReferenceAttribute.java View File

@@ -0,0 +1,41 @@
/*
* 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.data;

import java.util.List;
import java.util.ArrayList;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* Simple class to test typed adder.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestReferenceAttribute
{
private String m_someProp;

public boolean equals( final Object obj )
{
final ConfigTestReferenceAttribute test = (ConfigTestReferenceAttribute)obj;
if( !DefaultConfigurerTest.equals( m_someProp, test.m_someProp ) )
{
return false;
}
else
{
return true;
}
}

public void setSomeProp( final String value )
{
m_someProp = value;
}
}

+ 35
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestReferenceConversion.java View File

@@ -0,0 +1,35 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;
import org.apache.myrmidon.components.configurer.MyRole1;
import org.apache.myrmidon.components.configurer.ConfigTestInterfaceProp;

/**
* A simple test class.
*
* @author Adam Murdoch
*/
public class ConfigTestReferenceConversion
{
private final ArrayList m_elems = new ArrayList();

public void setPropA( final MyRole1 role1 )
{
m_elems.add( role1 );
}

public boolean equals( Object obj )
{
final ConfigTestReferenceConversion test = (ConfigTestReferenceConversion)obj;
return m_elems.equals( test.m_elems );
}
}

+ 37
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestReferenceElement.java View File

@@ -0,0 +1,37 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* A simple test class.
*
* @author Adam Murdoch
*/
public class ConfigTestReferenceElement
{
private String m_someProp;

public boolean equals( Object obj )
{
ConfigTestReferenceElement test = (ConfigTestReferenceElement)obj;
if( !DefaultConfigurerTest.equals( m_someProp, test.m_someProp ) )
{
return false;
}
return true;
}

public void addSomeProp( final String value )
{
m_someProp = value;
}
}

+ 51
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestSetAttribute.java View File

@@ -0,0 +1,51 @@
/*
* 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.data;

import java.util.List;
import java.util.ArrayList;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* Simple class to test typed adder.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestSetAttribute
{
private String m_someProp;
private List m_propList = new ArrayList();

public boolean equals( final Object obj )
{
final ConfigTestSetAttribute test = (ConfigTestSetAttribute)obj;
if( !DefaultConfigurerTest.equals( m_someProp, test.m_someProp ) )
{
return false;
}
else if( !m_propList.equals( test.m_propList ) )
{
return false;
}
else
{
return true;
}
}

public void setSomeProp( final String value )
{
m_someProp = value;
}

public void setProp( final String value )
{
m_propList.add( value );
}
}

+ 57
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestSetElement.java View File

@@ -0,0 +1,57 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* A simple test class.
*
* @author Adam Murdoch
*/
public class ConfigTestSetElement
{
private ConfigTestSetElement m_prop;
private List m_propList = new ArrayList();
private String m_someProp;

public boolean equals( Object obj )
{
ConfigTestSetElement test = (ConfigTestSetElement)obj;
if( !DefaultConfigurerTest.equals( m_prop, test.m_prop ) )
{
return false;
}
else if( !m_propList.equals( test.m_propList ) )
{
return false;
}
else if( !DefaultConfigurerTest.equals( m_someProp, test.m_someProp ) )
{
return false;
}
return true;
}

public void setSomeProp( final String value )
{
m_someProp = value;
}

public void addProp( final ConfigTestSetElement test )
{
m_prop = test;
}

public void addAnotherProp( final ConfigTestSetElement test )
{
m_propList.add( test );
}
}

+ 34
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdder.java View File

@@ -0,0 +1,34 @@
/*
* 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.data;

import java.util.ArrayList;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.myrmidon.components.configurer.MyRole1;

/**
* Simple class to test adder for Configurations.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestTypedAdder
{
private ArrayList m_roles = new ArrayList();

public void add( final MyRole1 role )
{
m_roles.add( role );
}

public boolean equals( final Object object )
{
final ConfigTestTypedAdder other = (ConfigTestTypedAdder)object;
return m_roles.equals( other.m_roles );
}
}

+ 40
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdderConversion.java View File

@@ -0,0 +1,40 @@
/*
* 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.data;

import java.util.ArrayList;
import org.apache.myrmidon.components.configurer.MyRole1;
import org.apache.myrmidon.framework.DataType;

/**
* Simple class to test typed adder.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestTypedAdderConversion
implements DataType
{
private ArrayList m_roles = new ArrayList();
private String m_prop;

public void setProp( final String prop )
{
m_prop = prop;
}
public void add( final MyRole1 role1 )
{
m_roles.add( role1 );
}

public boolean equals( final Object object )
{
final ConfigTestTypedAdderConversion other = (ConfigTestTypedAdderConversion)object;
return m_roles.equals( other.m_roles );
}
}

+ 33
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdderReference.java View File

@@ -0,0 +1,33 @@
/*
* 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.data;

import java.util.ArrayList;
import org.apache.myrmidon.components.configurer.MyRole1;

/**
* Simple class to test typed adder.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestTypedAdderReference
{
private ArrayList m_roles = new ArrayList();

public void add( final MyRole1 role1 )
{
m_roles.add( role1 );
}

public boolean equals( final Object object )
{
final ConfigTestTypedAdderReference other = (ConfigTestTypedAdderReference)object;
return m_roles.equals( other.m_roles );
}
}

+ 33
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdderRole.java View File

@@ -0,0 +1,33 @@
/*
* 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.data;

import java.util.ArrayList;
import org.apache.myrmidon.components.configurer.MyRole1;

/**
* Simple class to test typed adder.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestTypedAdderRole
{
private ArrayList m_roles = new ArrayList();

public void add( final MyRole1 role1 )
{
m_roles.add( role1 );
}

public boolean equals( final Object object )
{
final ConfigTestTypedAdderRole other = (ConfigTestTypedAdderRole)object;
return m_roles.equals( other.m_roles );
}
}

+ 33
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestTypedConfigAdder.java View File

@@ -0,0 +1,33 @@
/*
* 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.data;

import java.util.ArrayList;
import org.apache.avalon.framework.configuration.Configuration;

/**
* Simple class to test adder for Configurations.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestTypedConfigAdder
{
private ArrayList m_configurations = new ArrayList();

public void add( final Configuration configuration )
{
m_configurations.add( configuration );
}

public boolean equals( final Object object )
{
final ConfigTestTypedConfigAdder other = (ConfigTestTypedConfigAdder)object;
return m_configurations.equals( other.m_configurations );
}
}

+ 26
- 0
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/data/ConfigTestUnknownReference.java View File

@@ -0,0 +1,26 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.framework.DataType;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* A simple test class with string properties.
*
* @author Adam Murdoch
*/
public class ConfigTestUnknownReference
implements DataType
{
public void setSomeProp( final String value )
{
}
}

+ 46
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestAttributeConvert.java View File

@@ -0,0 +1,46 @@
/*
* 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.data;

import org.apache.myrmidon.components.AbstractComponentTest;

/**
* A class for testing conversion.
*
* @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
*/
public class ConfigTestAttributeConvert
{
private int m_intProp;
private Integer m_integerProp;

public void setIntProp( final int intProp )
{
m_intProp = intProp;
}

public void setIntegerProp( final Integer integerProp )
{
m_integerProp = integerProp;
}

public boolean equals( Object obj )
{
ConfigTestAttributeConvert test = (ConfigTestAttributeConvert)obj;
if( m_intProp != test.m_intProp )
{
return false;
}
if( !AbstractComponentTest.equals( m_integerProp, test.m_integerProp ) )
{
return false;
}

return true;
}
}

+ 42
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestContent.java View File

@@ -0,0 +1,42 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.framework.DataType;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* A simple test class with string properties.
*
* @author Adam Murdoch
*/
public class ConfigTestContent
implements DataType
{
private String m_content;

public boolean equals( final Object obj )
{
final ConfigTestContent test = (ConfigTestContent)obj;
if( !DefaultConfigurerTest.equals( m_content, test.m_content ) )
{
return false;
}
else
{
return true;
}
}

public void addContent( final String content )
{
m_content = content;
}
}

+ 22
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestEmpty.java View File

@@ -0,0 +1,22 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.framework.DataType;

/**
* A simple test class with string properties.
*
* @author Adam Murdoch
*/
public class ConfigTestEmpty
implements DataType
{
}

+ 42
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestIdResolve.java View File

@@ -0,0 +1,42 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.framework.DataType;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* A simple test class with string properties.
*
* @author Adam Murdoch
*/
public class ConfigTestIdResolve
implements DataType
{
private String m_someProp;

public boolean equals( final Object obj )
{
final ConfigTestIdResolve test = (ConfigTestIdResolve)obj;
if( !DefaultConfigurerTest.equals( m_someProp, test.m_someProp ) )
{
return false;
}
else
{
return true;
}
}

public void setSomeProp( final String value )
{
m_someProp = value;
}
}

+ 67
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestIgnoreStringMethods.java View File

@@ -0,0 +1,67 @@
/*
* 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.data;

import java.util.ArrayList;
import junit.framework.AssertionFailedError;
import org.apache.myrmidon.components.configurer.ConfigTestStringProps;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;
import org.apache.myrmidon.components.configurer.ConfigTestMultiSetter;

/**
* A test class with multiple setters/adders/creators for a property.
*
* @author Adam Murdoch
*/
public class ConfigTestIgnoreStringMethods
{
private ConfigTestIgnoreStringMethods m_prop1;
private ArrayList m_prop2 = new ArrayList();

public boolean equals( Object obj )
{
ConfigTestIgnoreStringMethods test = (ConfigTestIgnoreStringMethods)obj;
if( !DefaultConfigurerTest.equals( m_prop1, test.m_prop1 ) )
{
return false;
}
if( !m_prop2.equals( test.m_prop2 ) )
{
return false;
}
return true;
}

//
// Multiple setters
//

public void addProp1( final String value )
{
throw new AssertionFailedError();
}

public void addProp1( final ConfigTestIgnoreStringMethods value )
{
m_prop1 = value;
}

//
// Multiple Adders
//

public void addProp2( final String value )
{
throw new AssertionFailedError();
}

public void addProp2( final ConfigTestIgnoreStringMethods value )
{
m_prop2.add( value );
}
}

+ 33
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestInterfaceAdder.java View File

@@ -0,0 +1,33 @@
/*
* 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.data;

import java.util.ArrayList;
import org.apache.myrmidon.components.configurer.MyRole1;

/**
* A test class with an interface property.
*
* @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
* @version $Revision$ $Date$
*/
public class ConfigTestInterfaceAdder
{
private final ArrayList m_elems = new ArrayList();

public void addPropA( final MyRole1 role1 )
{
m_elems.add( role1 );
}

public boolean equals( Object obj )
{
final ConfigTestInterfaceAdder test = (ConfigTestInterfaceAdder)obj;
return m_elems.equals( test.m_elems );
}
}

+ 26
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestMismatchedRefType.java View File

@@ -0,0 +1,26 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.framework.DataType;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* A simple test class with string properties.
*
* @author Adam Murdoch
*/
public class ConfigTestMismatchedRefType
implements DataType
{
public void setSomeProp( final String value )
{
}
}

+ 28
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestMultipleTypedAdder.java View File

@@ -0,0 +1,28 @@
/*
* 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.data;

import org.apache.myrmidon.components.configurer.MyRole1;
import org.apache.myrmidon.components.configurer.MyRole2;

/**
* Simple class with more than one typed adder method.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestMultipleTypedAdder
{
public void add( final MyRole1 role1 )
{
}

public void add( final MyRole2 role2 )
{
}
}

+ 23
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestNonInterfaceAdder.java View File

@@ -0,0 +1,23 @@
/*
* 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.data;

/**
* Simple class to test typed adder.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestNonInterfaceAdder
{
public void add( final Integer integer )
{
System.out.println( "This should not have been called as " +
"Integer is not an interface" );
}
}

+ 41
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestPropResolution.java View File

@@ -0,0 +1,41 @@
/*
* 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.data;

import java.util.List;
import java.util.ArrayList;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* Simple class to test typed adder.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestPropResolution
{
private String m_prop;

public boolean equals( final Object obj )
{
final ConfigTestPropResolution test = (ConfigTestPropResolution)obj;
if( !DefaultConfigurerTest.equals( m_prop, test.m_prop ) )
{
return false;
}
else
{
return true;
}
}

public void setProp( final String value )
{
m_prop = value;
}
}

+ 41
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestReferenceAttribute.java View File

@@ -0,0 +1,41 @@
/*
* 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.data;

import java.util.List;
import java.util.ArrayList;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* Simple class to test typed adder.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestReferenceAttribute
{
private String m_someProp;

public boolean equals( final Object obj )
{
final ConfigTestReferenceAttribute test = (ConfigTestReferenceAttribute)obj;
if( !DefaultConfigurerTest.equals( m_someProp, test.m_someProp ) )
{
return false;
}
else
{
return true;
}
}

public void setSomeProp( final String value )
{
m_someProp = value;
}
}

+ 35
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestReferenceConversion.java View File

@@ -0,0 +1,35 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;
import org.apache.myrmidon.components.configurer.MyRole1;
import org.apache.myrmidon.components.configurer.ConfigTestInterfaceProp;

/**
* A simple test class.
*
* @author Adam Murdoch
*/
public class ConfigTestReferenceConversion
{
private final ArrayList m_elems = new ArrayList();

public void setPropA( final MyRole1 role1 )
{
m_elems.add( role1 );
}

public boolean equals( Object obj )
{
final ConfigTestReferenceConversion test = (ConfigTestReferenceConversion)obj;
return m_elems.equals( test.m_elems );
}
}

+ 37
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestReferenceElement.java View File

@@ -0,0 +1,37 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* A simple test class.
*
* @author Adam Murdoch
*/
public class ConfigTestReferenceElement
{
private String m_someProp;

public boolean equals( Object obj )
{
ConfigTestReferenceElement test = (ConfigTestReferenceElement)obj;
if( !DefaultConfigurerTest.equals( m_someProp, test.m_someProp ) )
{
return false;
}
return true;
}

public void addSomeProp( final String value )
{
m_someProp = value;
}
}

+ 51
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestSetAttribute.java View File

@@ -0,0 +1,51 @@
/*
* 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.data;

import java.util.List;
import java.util.ArrayList;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* Simple class to test typed adder.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestSetAttribute
{
private String m_someProp;
private List m_propList = new ArrayList();

public boolean equals( final Object obj )
{
final ConfigTestSetAttribute test = (ConfigTestSetAttribute)obj;
if( !DefaultConfigurerTest.equals( m_someProp, test.m_someProp ) )
{
return false;
}
else if( !m_propList.equals( test.m_propList ) )
{
return false;
}
else
{
return true;
}
}

public void setSomeProp( final String value )
{
m_someProp = value;
}

public void setProp( final String value )
{
m_propList.add( value );
}
}

+ 57
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestSetElement.java View File

@@ -0,0 +1,57 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* A simple test class.
*
* @author Adam Murdoch
*/
public class ConfigTestSetElement
{
private ConfigTestSetElement m_prop;
private List m_propList = new ArrayList();
private String m_someProp;

public boolean equals( Object obj )
{
ConfigTestSetElement test = (ConfigTestSetElement)obj;
if( !DefaultConfigurerTest.equals( m_prop, test.m_prop ) )
{
return false;
}
else if( !m_propList.equals( test.m_propList ) )
{
return false;
}
else if( !DefaultConfigurerTest.equals( m_someProp, test.m_someProp ) )
{
return false;
}
return true;
}

public void setSomeProp( final String value )
{
m_someProp = value;
}

public void addProp( final ConfigTestSetElement test )
{
m_prop = test;
}

public void addAnotherProp( final ConfigTestSetElement test )
{
m_propList.add( test );
}
}

+ 34
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdder.java View File

@@ -0,0 +1,34 @@
/*
* 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.data;

import java.util.ArrayList;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.myrmidon.components.configurer.MyRole1;

/**
* Simple class to test adder for Configurations.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestTypedAdder
{
private ArrayList m_roles = new ArrayList();

public void add( final MyRole1 role )
{
m_roles.add( role );
}

public boolean equals( final Object object )
{
final ConfigTestTypedAdder other = (ConfigTestTypedAdder)object;
return m_roles.equals( other.m_roles );
}
}

+ 40
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdderConversion.java View File

@@ -0,0 +1,40 @@
/*
* 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.data;

import java.util.ArrayList;
import org.apache.myrmidon.components.configurer.MyRole1;
import org.apache.myrmidon.framework.DataType;

/**
* Simple class to test typed adder.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestTypedAdderConversion
implements DataType
{
private ArrayList m_roles = new ArrayList();
private String m_prop;

public void setProp( final String prop )
{
m_prop = prop;
}
public void add( final MyRole1 role1 )
{
m_roles.add( role1 );
}

public boolean equals( final Object object )
{
final ConfigTestTypedAdderConversion other = (ConfigTestTypedAdderConversion)object;
return m_roles.equals( other.m_roles );
}
}

+ 33
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdderReference.java View File

@@ -0,0 +1,33 @@
/*
* 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.data;

import java.util.ArrayList;
import org.apache.myrmidon.components.configurer.MyRole1;

/**
* Simple class to test typed adder.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestTypedAdderReference
{
private ArrayList m_roles = new ArrayList();

public void add( final MyRole1 role1 )
{
m_roles.add( role1 );
}

public boolean equals( final Object object )
{
final ConfigTestTypedAdderReference other = (ConfigTestTypedAdderReference)object;
return m_roles.equals( other.m_roles );
}
}

+ 33
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestTypedAdderRole.java View File

@@ -0,0 +1,33 @@
/*
* 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.data;

import java.util.ArrayList;
import org.apache.myrmidon.components.configurer.MyRole1;

/**
* Simple class to test typed adder.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestTypedAdderRole
{
private ArrayList m_roles = new ArrayList();

public void add( final MyRole1 role1 )
{
m_roles.add( role1 );
}

public boolean equals( final Object object )
{
final ConfigTestTypedAdderRole other = (ConfigTestTypedAdderRole)object;
return m_roles.equals( other.m_roles );
}
}

+ 33
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestTypedConfigAdder.java View File

@@ -0,0 +1,33 @@
/*
* 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.data;

import java.util.ArrayList;
import org.apache.avalon.framework.configuration.Configuration;

/**
* Simple class to test adder for Configurations.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public class ConfigTestTypedConfigAdder
{
private ArrayList m_configurations = new ArrayList();

public void add( final Configuration configuration )
{
m_configurations.add( configuration );
}

public boolean equals( final Object object )
{
final ConfigTestTypedConfigAdder other = (ConfigTestTypedConfigAdder)object;
return m_configurations.equals( other.m_configurations );
}
}

+ 26
- 0
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/data/ConfigTestUnknownReference.java View File

@@ -0,0 +1,26 @@
/*
* 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.data;

import java.util.ArrayList;
import java.util.List;
import org.apache.myrmidon.framework.DataType;
import org.apache.myrmidon.components.configurer.DefaultConfigurerTest;

/**
* A simple test class with string properties.
*
* @author Adam Murdoch
*/
public class ConfigTestUnknownReference
implements DataType
{
public void setSomeProp( final String value )
{
}
}

Loading…
Cancel
Save