You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by oh...@apache.org on 2011/04/06 12:06:25 UTC
svn commit: r1089379 -
/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestCompositeConfiguration.java
Author: oheger
Date: Wed Apr 6 10:06:24 2011
New Revision: 1089379
URL: http://svn.apache.org/viewvc?rev=1089379&view=rev
Log:
[CONFIGURATION-441] Added a test case.
Modified:
commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestCompositeConfiguration.java
Modified: commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestCompositeConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestCompositeConfiguration.java?rev=1089379&r1=1089378&r2=1089379&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestCompositeConfiguration.java (original)
+++ commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestCompositeConfiguration.java Wed Apr 6 10:06:24 2011
@@ -806,6 +806,23 @@ public class TestCompositeConfiguration
}
/**
+ * Tests whether interpolation works if multiple configurations are
+ * involved. This test is related to CONFIGURATION-441.
+ */
+ public void testInterpolationInMultipleConfigs()
+ {
+ Configuration c1 = new PropertiesConfiguration();
+ c1.addProperty("property.one", "one");
+ c1.addProperty("property.two", "two");
+ Configuration c2 = new PropertiesConfiguration();
+ c2.addProperty("property.one.ref", "${property.one}");
+ cc.addConfiguration(c1);
+ cc.addConfiguration(c2);
+ assertEquals("Wrong interpolated value", "one",
+ cc.getString("property.one.ref"));
+ }
+
+ /**
* A test configuration event listener that counts the number of received
* events. Used for testing the event facilities.
*/