Package org.springframework.webflow.core

Examples of org.springframework.webflow.core.FlowException


    request.setServletPath("/app");
    request.setPathInfo("/foo");
    request.setRequestURI("/springtravel/app/foo");
    request.setMethod("GET");
    executor.launchExecution("foo", null, context);
    FlowException flowException = new FlowException("Error") {
    };
    EasyMock.expectLastCall().andThrow(flowException);
    EasyMock.replay(new Object[] { executor });
    try {
      controller.handleRequest(request, response);
View Full Code Here


    request.setPathInfo("/foo");
    request.setRequestURI("/springtravel/app/foo");
    request.setMethod("GET");
    request.addParameter("execution", "12345");
    executor.resumeExecution("12345", context);
    FlowException flowException = new NoSuchFlowExecutionException(new MockFlowExecutionKey("12345"), null);
    EasyMock.expectLastCall().andThrow(flowException);
    EasyMock.replay(new Object[] { executor });
    ModelAndView mv = controller.handleRequest(request, response);
    assertNull(mv);
    assertEquals("/springtravel/app/foo", response.getRedirectedUrl());
View Full Code Here

    assertEquals("/springtravel/app/foo?bar=baz", response.getRedirectedUrl());
    EasyMock.verify(new Object[] { executor });
  }

  public void testHandleFlowExceptionCustomFlowHandler() throws Exception {
    final FlowException flowException = new FlowException("Error") {
    };

    controller.registerFlowHandler(new FlowHandler() {
      public String getFlowId() {
        return "foo";
View Full Code Here

    request.setRequestURI("/springtravel/app/foo");
    request.setMethod("GET");
    Map parameters = new HashMap();
    request.setParameters(parameters);
    flowExecutor.launchExecution("foo", flowInput, context);
    FlowException flowException = new FlowException("Error") {
    };
    EasyMock.expectLastCall().andThrow(flowException);
    EasyMock.replay(new Object[] { flowExecutor });
    try {
      flowHandlerAdapter.handle(request, response, flowHandler);
View Full Code Here

    request.setPathInfo("/foo");
    request.setRequestURI("/springtravel/app/foo");
    request.setMethod("GET");
    request.addParameter("execution", "12345");
    flowExecutor.resumeExecution("12345", context);
    FlowException flowException = new NoSuchFlowExecutionException(new MockFlowExecutionKey("12345"), null);
    EasyMock.expectLastCall().andThrow(flowException);
    EasyMock.replay(new Object[] { flowExecutor });
    flowHandlerAdapter.handle(request, response, flowHandler);
    assertEquals("/springtravel/app/foo", response.getRedirectedUrl());
    EasyMock.verify(new Object[] { flowExecutor });
View Full Code Here

    EasyMock.verify(new Object[] { flowExecutor });
  }

  public void testHandleFlowExceptionCustomFlowHandler() throws Exception {
    handleException = true;
    final FlowException flowException = new FlowException("Error") {
    };
    request.setContextPath("/springtravel");
    request.setServletPath("/app");
    request.setPathInfo("/foo");
    request.setRequestURI("/springtravel/app/foo");
View Full Code Here

    EasyMock.verify(new Object[] { flowExecutor });
  }

  public void testDefaultHandleFlowException() throws Exception {
    PortletSession session = renderRequest.getPortletSession();
    final FlowException flowException = new FlowException("Error") {
    };
    session.setAttribute("actionRequestFlowException", flowException);
    try {
      controller.handleRender(renderRequest, renderResponse, flowHandler);
      fail("Should have thrown exception");
View Full Code Here

  public void testDefaultHandleNoSuchFlowExecutionException() throws Exception {
    actionRequest.setContextPath("/springtravel");
    actionRequest.addParameter("execution", "12345");
    flowExecutor.resumeExecution("12345", actionContext);
    FlowException flowException = new NoSuchFlowExecutionException(new MockFlowExecutionKey("12345"), null);
    EasyMock.expectLastCall().andThrow(flowException);
    EasyMock.replay(new Object[] { flowExecutor });
    controller.handleAction(actionRequest, actionResponse, flowHandler);
    assertNotNull(actionRequest.getPortletSession().getAttribute("actionRequestFlowException"));
    EasyMock.verify(new Object[] { flowExecutor });
View Full Code Here

    EasyMock.verify(new Object[] { flowExecutor });
  }

  public void testHandleFlowExceptionCustomFlowHandler() throws Exception {
    handleException = true;
    final FlowException flowException = new FlowException("Error") {
    };
    renderRequest.setContextPath("/springtravel");
    flowExecutor.launchExecution("foo", flowInput, renderContext);
    EasyMock.expectLastCall().andThrow(flowException);
    EasyMock.replay(new Object[] { flowExecutor });
View Full Code Here

  }

  public void testHandleFlowExceptionFromSession() throws Exception {
    handleException = true;
    PortletSession session = renderRequest.getPortletSession();
    final FlowException flowException = new FlowException("Error") {
    };
    session.setAttribute("actionRequestFlowException", flowException);
    ModelAndView mv = controller.handleRender(renderRequest, renderResponse, flowHandler);
    assertEquals("error", mv.getViewName());
  }
View Full Code Here

TOP

Related Classes of org.springframework.webflow.core.FlowException

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.