Package org.springframework.webflow.execution

Examples of org.springframework.webflow.execution.TestAction


    }
  }

  public void testExecuteActionInStateWithException() {
    context.getMockFlowExecutionContext().getMockActiveSession().setState(state);
    TestAction action = new TestAction() {
      protected Event doExecute(RequestContext context) throws Exception {
        throw new IllegalStateException("Oops");
      }
    };
    try {
View Full Code Here


  public void testResolveSpringBean() {
    MockRequestContext context = new MockRequestContext();
    StaticApplicationContext ac = new StaticApplicationContext();
    ac.getBeanFactory().registerSingleton("testBean", new TestBean());
    ac.getBeanFactory().registerSingleton("action", new TestAction());
    ac.getBeanFactory().registerSingleton("multiAction", new FormAction(TestBean.class));
    context.getRootFlow().setApplicationContext(ac);
    context.getConversationScope().put("foo", "bar");
    Expression exp = parser.parseExpression("foo", new FluentParserContext().evaluate(RequestContext.class));
    assertEquals("bar", exp.getValue(context));
View Full Code Here

  public void testResolveAction() {
    MockRequestContext context = new MockRequestContext();
    StaticApplicationContext ac = new StaticApplicationContext();
    ac.getBeanFactory().registerSingleton("testBean", new TestBean());
    ac.getBeanFactory().registerSingleton("action", new TestAction());
    context.getRootFlow().setApplicationContext(ac);
    Expression exp = parser.parseExpression("action", new FluentParserContext().evaluate(RequestContext.class));
    assertSame(ac.getBean("action"), exp.getValue(context));
  }
View Full Code Here

TOP

Related Classes of org.springframework.webflow.execution.TestAction

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.