Package org.strecks.context

Examples of org.strecks.context.ActionContextFactory


  @Test
  public void testCreateAction() throws Exception
  {
    ServletActionContext sac = getActionContext();
    ControllerProcessorDelegate delegate = newMock(ControllerProcessorDelegate.class);
    ActionContextFactory factory = newMock(ActionContextFactory.class);
    ExecuteAction executeAction = getExecuteAction(delegate, factory);
    Action action = newMock(Action.class);
    ActionMapping actionConfig = newMock(ActionMapping.class);
    ActionForm actionForm = newMock(ActionForm.class);
    ActionContext actionContext = newMock(ActionContext.class);
    ActionForward forwardConfig = newMock(ActionForward.class);
    HttpServletRequest request = newMock(HttpServletRequest.class);
    HttpServletResponse response = newMock(HttpServletResponse.class);
    ServletContext servletContext = newMock(ServletContext.class);
   
    expect(sac.getRequest()).andReturn(request);
    expect(sac.getResponse()).andReturn(response);
    expect(sac.getContext()).andReturn(servletContext);
    expect(factory.createActionContext(request, response, servletContext, actionForm, actionConfig)).andReturn(actionContext);
    expect(action.execute(actionConfig, actionForm, request, response)).andReturn(forwardConfig);
   
    replayMocks();
    executeAction.execute(sac, action, actionConfig, actionForm);
    verifyMocks();
View Full Code Here

TOP

Related Classes of org.strecks.context.ActionContextFactory

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.