avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject svn commit: rev 30913 - avalon/trunk/runtime/framework/impl/src/test/org/apache/avalon/framework/configuration/test
Date Thu, 29 Jul 2004 08:28:55 GMT
Author: niclas
Date: Thu Jul 29 01:28:53 2004
New Revision: 30913

Modified:
   avalon/trunk/runtime/framework/impl/src/test/org/apache/avalon/framework/configuration/test/DefaultConfigurationTestCase.java
Log:
Added some attributes into the Parameters, to ensure that Attribute orders are not relevant.

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:28:53 2004
@@ -241,8 +241,8 @@
     public void testEquals()
         throws Exception
     {
-        DefaultConfiguration a = createSimple( "1", "2" );
-        DefaultConfiguration b = createSimple( "1", "2" );
+        DefaultConfiguration a = createSimple( "a1", "a2" );
+        DefaultConfiguration b = createSimple( "a1", "a2" );
         
         assertEquals( "equal test", a, b );
         
@@ -251,16 +251,16 @@
         
         assertEquals( "value equality", value1, value2 );
         
-        a = createSimple( "1", "2" );
-        b = createSimple( "2", "1" );
+        a = createSimple( "a1", "a2" );
+        b = createSimple( "a2", "a1" );
         
         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 );
+        assertEquals( "value equality", "a1", value1 );
+        assertEquals( "value equality", "a2", value2 );
     }
     
     private DefaultConfiguration createSimple( String value1, String value2 )
@@ -269,10 +269,19 @@
         DefaultConfiguration conf = new DefaultConfiguration( "root", "0:0", "http://root",
"root" );
         DefaultConfiguration child1 = new DefaultConfiguration( "child", "0:1", "http://root/child",
"child" );
         child1.setValue( value1 );
+        child1.setAttribute( value1, value1 );
+        child1.setAttribute( value2, value2 );
+        child1.setAttribute( value1, value2 );
+        child1.setAttribute( value2, value1 );
         conf.addChild( child1 );
         
         DefaultConfiguration child2 = new DefaultConfiguration( "child", "0:2", "http://root/child",
"child" );
         child2.setValue( value2 );
+        child1.setAttribute( value2, value2 );
+        child1.setAttribute( value1, value1 );
+        child1.setAttribute( value2, value1 );
+        child1.setAttribute( value1, value2 );
+        child2.setAttribute( value2, value2 );
         conf.addChild( child2 );
         
         conf.makeReadOnly();

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message