Esempio n. 1
0
 @Test
 public void testLoadResourceWithPrerequisiteSubsitution() {
   context.putProperty("STEM", "asResource/joran");
   atts.setValue("resource", "${STEM}/propertyActionTest.properties");
   propertyAction.begin(ec, null, atts);
   assertEquals("tata", ec.getProperty("r1"));
   assertEquals("toto", ec.getProperty("r2"));
 }
Esempio n. 2
0
 @Test
 public void nameValuePairWithPrerequisiteSubsitution() {
   context.putProperty("w", "wor");
   atts.setValue("name", "v1");
   atts.setValue("value", "${w}k");
   propertyAction.begin(ec, null, atts);
   assertEquals("work", ec.getProperty("v1"));
 }
Esempio n. 3
0
 @Test
 public void testLoadFileWithPrerequisiteSubsitution() {
   context.putProperty("STEM", CoreTestConstants.TEST_SRC_PREFIX + "input/joran");
   atts.setValue("file", "${STEM}/propertyActionTest.properties");
   propertyAction.begin(ec, null, atts);
   assertEquals("tata", ec.getProperty("v1"));
   assertEquals("toto", ec.getProperty("v2"));
 }