You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ni...@apache.org on 2004/07/29 10:24:00 UTC
svn commit: rev 30912 - avalon/trunk/runtime/framework/impl/src/test/org/apache/avalon/framework/configuration/test
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 )
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org