use of org.pentaho.platform.util.beans.PropertyNameFormatter in project pentaho-platform by pentaho.
the class ActionHarnessTest method testSetValueWithFormatter.
@Test
public void testSetValueWithFormatter() throws Exception {
TestAction action1 = new TestAction();
ActionHarness harness1 = new ActionHarness(action1);
PropertyNameFormatter f = new PropertyNameFormatter() {
public String format(String name) {
return "message";
}
};
harness1.setValue("THISWILLGETCLOBBERED", "test message action1", new EagerFailingCallback(), f);
Assert.assertEquals("test message action1", harness1.getValue("message"));
}
use of org.pentaho.platform.util.beans.PropertyNameFormatter in project pentaho-platform by pentaho.
the class ActionHarnessTest method testSetValueWithFormatterNonExistentProperty.
@Test(expected = IllegalAccessException.class)
public void testSetValueWithFormatterNonExistentProperty() throws Exception {
TestAction action1 = new TestAction();
ActionHarness harness1 = new ActionHarness(action1);
PropertyNameFormatter f = new PropertyNameFormatter() {
public String format(String name) {
return "THISPROPERTYDOESNOTEXIST";
}
};
harness1.setValue("THISWILLGETCLOBBERED", "test message action1", new EagerFailingCallback(), f);
}
Aggregations