message = LocalizedTextUtil.findDefaultText(XWorkMessages.ACTION_EXECUTION_ERROR, Locale.getDefault());
assertEquals("Testing resource bundle override", message);
}
public void testFindTextInChildProperty() throws Exception {
ModelDriven action = new ModelDrivenAction2();
TestBean2 bean = (TestBean2) action.getModel();
Bar bar = new Bar();
bean.setBarObj(bar);
Mock mockActionInvocation = new Mock(ActionInvocation.class);
mockActionInvocation.expectAndReturn("hashCode", 0);
mockActionInvocation.expectAndReturn("getAction", action);
ActionContext.getContext().setActionInvocation((ActionInvocation) mockActionInvocation.proxy());
ActionContext.getContext().getValueStack().push(action);
ActionContext.getContext().getValueStack().push(action.getModel());
String message = LocalizedTextUtil.findText(ModelDrivenAction2.class, "invalid.fieldvalue.barObj.title", Locale.getDefault());
assertEquals("Title is invalid!", message);
}