assertTrue(getErrors(context).hasErrors());
assertEquals("", getFormObject(context).getProp());
}
public void testMultipleFormObjectsInOneFlow() throws Exception {
MockRequestContext context = new MockRequestContext(parameters());
FormAction otherAction = createFormAction("otherTest");
assertEquals(action.getEventFactorySupport().getSuccessEventId(), action.setupForm(context).getId());
assertEquals(action.getEventFactorySupport().getSuccessEventId(), otherAction.setupForm(context).getId());
assertEquals(3, context.getRequestScope().size());
assertEquals(3, context.getFlowScope().size());
assertNotSame(getErrors(context), getErrors(context, "otherTest"));
assertNotSame(getFormObject(context), getFormObject(context, "otherTest"));
assertFalse(getErrors(context).hasErrors());
assertFalse(getErrors(context, "otherTest").hasErrors());
assertNull(getFormObject(context).getProp());
assertNull(getFormObject(context, "otherTest").getProp());
assertEquals(action.getEventFactorySupport().getSuccessEventId(), action.bindAndValidate(context).getId());
assertEquals(3, context.getRequestScope().size());
assertEquals(3, context.getFlowScope().size());
assertNotSame(getErrors(context), getErrors(context, "otherTest"));
assertNotSame(getFormObject(context), getFormObject(context, "otherTest"));
assertFalse(getErrors(context).hasErrors());
assertFalse(getErrors(context, "otherTest").hasErrors());
assertEquals("value", getFormObject(context).getProp());
assertNull(getFormObject(context, "otherTest").getProp());
context.setExternalContext(new MockExternalContext(blankParameters()));
assertEquals(action.getEventFactorySupport().getErrorEventId(), otherAction.bindAndValidate(context).getId());
assertEquals(3, context.getRequestScope().size());
assertEquals(3, context.getFlowScope().size());
assertNotSame(getErrors(context), getErrors(context, "otherTest"));
assertNotSame(getFormObject(context), getFormObject(context, "otherTest"));
assertFalse(getErrors(context).hasErrors());
assertTrue(getErrors(context, "otherTest").hasErrors());
assertEquals("value", getFormObject(context).getProp());