Author: niclas
Date: Thu Jul 29 01:23:58 2004
New Revision: 30912
Modified:
avalon/trunk/runtime/framework/impl/src/test/org/apache/avalon/framework/configuration/test/DefaultConfigurationTestCase.java
Log:
Modified the testcase to the intents of the semantic contract regarding orders of Configuration children.
Modified: avalon/trunk/runtime/framework/impl/src/test/org/apache/avalon/framework/configuration/test/DefaultConfigurationTestCase.java
==============================================================================
--- avalon/trunk/runtime/framework/impl/src/test/org/apache/avalon/framework/configuration/test/DefaultConfigurationTestCase.java (original)
+++ avalon/trunk/runtime/framework/impl/src/test/org/apache/avalon/framework/configuration/test/DefaultConfigurationTestCase.java Thu Jul 29 01:23:58 2004
@@ -242,14 +242,25 @@
throws Exception
{
DefaultConfiguration a = createSimple( "1", "2" );
- DefaultConfiguration b = createSimple( "2", "1" );
+ DefaultConfiguration b = createSimple( "1", "2" );
- assertEquals( "order test", a, b );
+ assertEquals( "equal test", a, b );
String value1 = a.getChild( "child" ).getValue();
String value2 = b.getChild( "child" ).getValue();
assertEquals( "value equality", value1, value2 );
+
+ a = createSimple( "1", "2" );
+ b = createSimple( "2", "1" );
+
+ assertTrue( "order test", ! a.equals( b ) );
+
+ value1 = a.getChild( "child" ).getValue();
+ value2 = b.getChild( "child" ).getValue();
+
+ assertEquals( "value equality", "1", value1 );
+ assertEquals( "value equality", "2", value2 );
}
private DefaultConfiguration createSimple( String value1, String value2 )
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.