commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1089590 - /commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestInMemoryConfiguration.java
Date Wed, 06 Apr 2011 19:12:55 GMT
Author: oheger
Date: Wed Apr  6 19:12:54 2011
New Revision: 1089590

URL: http://svn.apache.org/viewvc?rev=1089590&view=rev
Log:
[CONFIGURATION-444] Added a test case.

Modified:
    commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestInMemoryConfiguration.java

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestInMemoryConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestInMemoryConfiguration.java?rev=1089590&r1=1089589&r2=1089590&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestInMemoryConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestInMemoryConfiguration.java
Wed Apr  6 19:12:54 2011
@@ -914,6 +914,20 @@ public class TestInMemoryConfiguration e
     }
 
     /**
+     * Tests whether interpolation with a subset configuration works over
+     * multiple layers.
+     */
+    public void testInterpolationSubsetMultipleLayers()
+    {
+        config.clear();
+        config.addProperty("var", "value");
+        config.addProperty("prop2.prop[@attr]", "${var}");
+        Configuration sub1 = config.subset("prop2");
+        Configuration sub2 = sub1.subset("prop");
+        assertEquals("Wrong value", "value", sub2.getString("[@attr]"));
+    }
+
+    /**
      * Tests interpolation of a variable, which cannot be resolved.
      */
     public void testInterpolationUnknownProperty()



Mime
View raw message