Package org.springframework.webflow.execution

Examples of org.springframework.webflow.execution.AnnotatedAction.execute()


        assertEquals("value", context.getAttributes().getString("attr"));
        assertEquals("value", context.getAttributes().getString("attr2"));
        return success();
      }
    });
    assertEquals("success", action2.execute(context).getId());
    assertEquals(0, context.getAttributes().size());
  }

  public void testExecuteWithName() throws Exception {
    action.getAttributes().put("name", "foo");
View Full Code Here


    model.setStates(asList(AbstractStateModel.class, new ViewStateModel("view")));
    Flow flow = getFlow(model);
    AnnotatedAction action = (AnnotatedAction) flow.getStartActionList().get(0);
    MockRequestContext context = new MockRequestContext(flow);
    context.getFlowScope().put("intArray", new int[] { 1, 2 });
    action.execute(context);
    String[] expected = (String[]) context.getFlowScope().get("stringArray");
    assertEquals("1", expected[0]);
    assertEquals("2", expected[1]);
  }
View Full Code Here

    Flow flow = getFlow(model);
    AnnotatedAction action = (AnnotatedAction) flow.getStartActionList().get(0);
    MockRequestContext context = new MockRequestContext(flow);
    context.getFlowScope().put("testBean", new TestBean());
    context.getFlowScope().put("intArray", new int[] { 1, 2 });
    action.execute(context);
    TestBean expected = (TestBean) context.getFlowScope().get("testBean");
    assertEquals("1", expected.stringArray[0]);
    assertEquals("2", expected.stringArray[1]);
  }
View Full Code Here

    model.setStates(asList(AbstractStateModel.class, new ViewStateModel("view")));
    Flow flow = getFlow(model);
    AnnotatedAction action = (AnnotatedAction) flow.getStartActionList().get(0);
    MockRequestContext context = new MockRequestContext(flow);
    context.getFlowScope().put("testBean", new TestBean());
    action.execute(context);
    String[] expected = (String[]) context.getFlowScope().get("stringArray");
    assertEquals("1", expected[0]);
    assertEquals("2", expected[1]);
  }
View Full Code Here

    model.setStates(asList(AbstractStateModel.class, new ViewStateModel("view")));
    Flow flow = getFlow(model);
    AnnotatedAction action = (AnnotatedAction) flow.getStartActionList().get(0);
    MockRequestContext context = new MockRequestContext(flow);
    context.getFlowScope().put("testBean", new TestBean());
    action.execute(context);
    String[] expected = (String[]) context.getFlowScope().get("stringArray");
    assertEquals("1", expected[0]);
    assertEquals("2", expected[1]);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.