assertTrue(view.hasFlowEvent());
assertEquals("submit", view.getFlowEvent().getId());
}
public void testResumeEventModelBinding() throws Exception {
MockRequestContext context = new MockRequestContext();
context.putRequestParameter("_eventId", "submit");
context.putRequestParameter("stringProperty", "foo");
context.putRequestParameter("integerProperty", "5");
context.putRequestParameter("dateProperty", "2007-01-01");
context.putRequestParameter("beanProperty.name", "foo");
context.putRequestParameter("multipartFile", new MockMultipartFile("foo", new byte[0]));
context.putRequestParameter("stringArrayProperty", new String[] { "foo", "bar", "baz" });
context.putRequestParameter("integerArrayProperty", new String[] { "1", "2", "3" });
context.putRequestParameter("primitiveArrayProperty", new String[] { "1", "2", "3" });
context.putRequestParameter("listProperty", new String[] { "1", "2", "3" });
BindBean bindBean = new BindBean();
StaticExpression modelObject = new StaticExpression(bindBean);
modelObject.setExpressionString("bindBean");
context.getCurrentState().getAttributes().put("model", modelObject);
context.getFlowScope().put("bindBean", bindBean);
context.getMockExternalContext().setNativeContext(new MockServletContext());
context.getMockExternalContext().setNativeRequest(new MockHttpServletRequest());
context.getMockExternalContext().setNativeResponse(new MockHttpServletResponse());
context.getMockFlowExecutionContext().setKey(new MockFlowExecutionKey("c1v1"));
org.springframework.web.servlet.View mvcView = new MockView();
AbstractMvcView view = new MockMvcView(mvcView, context);
view.setExpressionParser(DefaultExpressionParserFactory.getExpressionParser());
view.processUserEvent();
assertTrue(view.hasFlowEvent());