Package org.springframework.webflow.test

Examples of org.springframework.webflow.test.MockParameterMap


    assertFalse(getErrors(context).hasErrors());
    assertNull(getFormObject(context).getProp());
  }

  protected LocalParameterMap parameters() {
    MockParameterMap map = new MockParameterMap();
    map.put("prop", "value");
    return map;
  }
View Full Code Here


    map.put("prop", "value");
    return map;
  }

  protected LocalParameterMap blankParameters() {
    MockParameterMap map = new MockParameterMap();
    map.put("prop", "");
    return map;
  }
View Full Code Here

    action2.setupForm(context);
    TestBean test2 = (TestBean) context.getFlowScope().get("test2");
    assertNotNull(test2);
    assertSame(test2, new FormObjectAccessor(context).getCurrentFormObject());

    MockParameterMap parameters = new MockParameterMap();
    parameters.put("prop", "12345");
    context.setExternalContext(new MockExternalContext(parameters));
    action1.bindAndValidate(context);
    TestBean test11 = (TestBean) context.getFlowScope().get("test1");
    assertSame(test1, test11);
    assertEquals("12345", test1.getProp());
    assertSame(test1, new FormObjectAccessor(context).getCurrentFormObject());

    parameters = new MockParameterMap();
    parameters.put("prop", "123456");
    context.setExternalContext(new MockExternalContext(parameters));
    action2.bindAndValidate(context);
    TestBean test22 = (TestBean) context.getFlowScope().get("test2");
    assertSame(test22, test2);
    assertEquals("123456", test2.getProp());
View Full Code Here

    assertTrue("The lifecycle should have been invoked", ((EventSignalingLifecycle) lifecycle).executed);
  }

  public final void testUserEventQueued_GETRefresh() {

    MockParameterMap requestParameterMap = new MockParameterMap();
    requestParameterMap.put("execution", "e1s1");

    EasyMock.expect(this.context.getRequestParameters()).andStubReturn(requestParameterMap);
    EasyMock.replay(new Object[] { this.context, this.flowExecutionContext, this.flowMap, this.flashScope });

    JsfView createdView = new JsfView(new UIViewRoot(), this.jsfMock.lifecycle(), this.context);
View Full Code Here

    assertFalse(getErrors(context).hasErrors());
    assertNull(getFormObject(context).getProp());
  }

  protected LocalParameterMap parameters() {
    MockParameterMap map = new MockParameterMap();
    map.put("prop", "value");
    return map;
  }
View Full Code Here

    map.put("prop", "value");
    return map;
  }

  protected LocalParameterMap blankParameters() {
    MockParameterMap map = new MockParameterMap();
    map.put("prop", "");
    return map;
  }
View Full Code Here

    action2.setupForm(context);
    TestBean test2 = (TestBean) context.getFlowScope().get("test2");
    assertNotNull(test2);
    assertSame(test2, new FormObjectAccessor(context).getCurrentFormObject());

    MockParameterMap parameters = new MockParameterMap();
    parameters.put("prop", "12345");
    context.setExternalContext(new MockExternalContext(parameters));
    action1.bindAndValidate(context);
    TestBean test11 = (TestBean) context.getFlowScope().get("test1");
    assertSame(test1, test11);
    assertEquals("12345", test1.getProp());
    assertSame(test1, new FormObjectAccessor(context).getCurrentFormObject());

    parameters = new MockParameterMap();
    parameters.put("prop", "123456");
    context.setExternalContext(new MockExternalContext(parameters));
    action2.bindAndValidate(context);
    TestBean test22 = (TestBean) context.getFlowScope().get("test2");
    assertSame(test22, test2);
    assertEquals("123456", test2.getProp());
View Full Code Here

TOP

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

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.