- adding a test for the ${variable} interpolation in the getString()

methods.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130504 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2001-09-21 03:15:15 +00:00
parent 30a8d35e54
commit d2d3f62e25
1 changed files with 12 additions and 4 deletions

View File

@ -1,7 +1,7 @@
/*
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestExtendedProperties.java,v 1.3 2001/07/14 23:33:27 craigmcc Exp $
* $Revision: 1.3 $
* $Date: 2001/07/14 23:33:27 $
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestExtendedProperties.java,v 1.4 2001/09/21 03:15:15 jvanzyl Exp $
* $Revision: 1.4 $
* $Date: 2001/09/21 03:15:15 $
*
* ====================================================================
*
@ -70,7 +70,7 @@ import junit.framework.TestSuite;
* class
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
* @version $Id: TestExtendedProperties.java,v 1.3 2001/07/14 23:33:27 craigmcc Exp $
* @version $Id: TestExtendedProperties.java,v 1.4 2001/09/21 03:15:15 jvanzyl Exp $
*/
public class TestExtendedProperties extends TestCase
{
@ -144,4 +144,12 @@ public class TestExtendedProperties extends TestCase
assertTrue("This returns array for subset", ( subEprop.getVector("string") instanceof java.util.Vector) );
}
public void testInterpolation()
{
eprop.setProperty("applicationRoot", "/home/applicationRoot");
eprop.setProperty("db", "${applicationRoot}/db/hypersonic");
String dbProp = "/home/applicationRoot/db/hypersonic";
assertTrue("Checking interpolated variable", eprop.getString("db").equals(dbProp));
}
}