You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2010/02/21 02:29:57 UTC
svn commit: r912277 -
/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java
Author: doogie
Date: Sun Feb 21 01:29:57 2010
New Revision: 912277
URL: http://svn.apache.org/viewvc?rev=912277&view=rev
Log:
Move the testMap assignments to the beginning of the method.
Modified:
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java?rev=912277&r1=912276&r2=912277&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java Sun Feb 21 01:29:57 2010
@@ -40,21 +40,21 @@
}
public void testFlexibleStringExpander() {
- fseTest("null FlexibleStringExpander", null, null, "", true);
- fseTest("null context", "Hello World!", null, "Hello World!", false);
Map<String, Object> testMap = new HashMap<String, Object>();
testMap.put("var", "World");
- fseTest("simple replacement", "Hello ${var}!", testMap, "Hello World!", false);
testMap.put("nested", "Hello ${var}");
+ testMap.put("testMap", testMap);
+ List<String> testList = new ArrayList<String>();
+ testList.add("World");
+ testMap.put("testList", testList);
+ fseTest("null FlexibleStringExpander", null, null, "", true);
+ fseTest("null context", "Hello World!", null, "Hello World!", false);
+ fseTest("simple replacement", "Hello ${var}!", testMap, "Hello World!", false);
fseTest("hidden (runtime) nested replacement", "${nested}!", testMap, "Hello World!", false);
fseTest("visible nested replacement", "${'Hello ${var}'}!", testMap, "Hello World!", false);
fseTest("bsh: script", "${bsh:return \"Hello \" + var + \"!\";}", testMap, "Hello World!", false);
fseTest("groovy: script", "${groovy:return \"Hello \" + var + \"!\";}", testMap, "Hello World!", false);
- testMap.put("testMap", testMap);
fseTest("UEL integration: Map", "Hello ${testMap.var}!", testMap, "Hello World!", false);
- List<String> testList = new ArrayList<String>();
- testList.add("World");
- testMap.put("testList", testList);
fseTest("UEL integration: List", "Hello ${testList[0]}!", testMap, "Hello World!", false);
fseTest("Escaped expression", "This is an \\${escaped} expression", testMap, "This is an ${escaped} expression", false);
}