Package org.springframework.webflow.test

Examples of org.springframework.webflow.test.MockFlowExecutionKey


    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(createExpressionParser());
    view.setMessageCodesResolver(new WebFlowMessageCodesResolver());
    context.setAlwaysRedirectOnPause(true);
View Full Code Here


    };
    context.getCurrentState().getAttributes().put("model", modelObject);
    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(createExpressionParser());
    view.processUserEvent();
    assertTrue(view.hasFlowEvent());
View Full Code Here

    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(createExpressionParser());
    view.setMessageCodesResolver(new WebFlowMessageCodesResolver());
    context.setAlwaysRedirectOnPause(true);
    assertTrue(view.userEventQueued());
    view.processUserEvent();
    assertFalse(view.userEventQueued());
    assertFalse(view.hasFlowEvent());
    Object viewActionState = view.getUserEventState();
    assertNotNull(viewActionState);

    MockRequestControlContext context2 = new MockRequestControlContext();
    context2.getFlashScope().put(org.springframework.webflow.execution.View.USER_EVENT_STATE_ATTRIBUTE,
        viewActionState);
    BindBean bindBean2 = new BindBean();
    StaticExpression modelObject2 = new StaticExpression(bindBean2);
    modelObject2.setExpressionString("bindBean");
    context2.getCurrentState().getAttributes().put("model", modelObject);
    context2.getFlowScope().put("bindBean", bindBean);
    context2.getMockExternalContext().setNativeContext(new MockServletContext());
    context2.getMockExternalContext().setNativeRequest(new MockHttpServletRequest());
    context2.getMockExternalContext().setNativeResponse(new MockHttpServletResponse());
    context2.getMockFlowExecutionContext().setKey(new MockFlowExecutionKey("c1v1"));
    AbstractMvcView view2 = new MockMvcView(mvcView, context2);
    view2.setExpressionParser(createExpressionParser());
    view2.setMessageCodesResolver(new WebFlowMessageCodesResolver());
    view2.restoreState((ViewActionStateHolder) viewActionState);
    assertFalse(view2.userEventQueued());
View Full Code Here

    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(createExpressionParser());
    view.setMessageCodesResolver(new WebFlowMessageCodesResolver());
    context.setAlwaysRedirectOnPause(true);
    assertTrue(view.userEventQueued());
    view.processUserEvent();
    assertFalse(view.userEventQueued());
    assertFalse(view.hasFlowEvent());
    Object viewActionState = view.getUserEventState();
    assertNotNull(viewActionState);

    viewActionState = saveAndRestoreViewActionState(viewActionState);

    MockRequestControlContext context2 = new MockRequestControlContext();
    context2.getFlashScope().put(org.springframework.webflow.execution.View.USER_EVENT_STATE_ATTRIBUTE,
        viewActionState);
    BindBean bindBean2 = new BindBean();
    StaticExpression modelObject2 = new StaticExpression(bindBean2);
    modelObject2.setExpressionString("bindBean");
    context2.getCurrentState().getAttributes().put("model", modelObject);
    context2.getFlowScope().put("bindBean", bindBean);
    context2.getMockExternalContext().setNativeContext(new MockServletContext());
    context2.getMockExternalContext().setNativeRequest(new MockHttpServletRequest());
    context2.getMockExternalContext().setNativeResponse(new MockHttpServletResponse());
    context2.getMockFlowExecutionContext().setKey(new MockFlowExecutionKey("c1v1"));
    AbstractMvcView view2 = new MockMvcView(mvcView, context2);
    view2.setExpressionParser(createExpressionParser());
    view2.setMessageCodesResolver(new WebFlowMessageCodesResolver());
    view2.restoreState((ViewActionStateHolder) viewActionState);
    assertFalse(view2.userEventQueued());
View Full Code Here

    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(createExpressionParser());
    BinderConfiguration binderConfiguration = new BinderConfiguration();
    binderConfiguration.addBinding(new Binding("stringProperty", null, true));
View Full Code Here

    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(createExpressionParser());
    DefaultConversionService conversionService = new DefaultConversionService();
    StringToDate stringToDate = new StringToDate();
View Full Code Here

    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(createExpressionParser());
    view.processUserEvent();
    assertEquals(false, bindBean.getBooleanProperty());
View Full Code Here

    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(createExpressionParser());
    assertTrue(view.userEventQueued());
    view.processUserEvent();
View Full Code Here

    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(createExpressionParser());
    assertTrue(view.userEventQueued());
    view.processUserEvent();
View Full Code Here

    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(createExpressionParser());
    assertTrue(view.userEventQueued());
    view.processUserEvent();
View Full Code Here

TOP

Related Classes of org.springframework.webflow.test.MockFlowExecutionKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.