Package org.apache.struts.action

Examples of org.apache.struts.action.Action


  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(SimpleDispatchAction.class);
    BasicDispatchController controller = (BasicDispatchController) action;
    assert controller.getBeanSource() != null;
  }
View Full Code Here


  {
    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

    ActionConfig actionConfig = newMock(ActionConfig.class);
    ModuleConfig moduleConfig = newMock(ModuleConfig.class);
    ActionServlet servlet = newMock(ActionServlet.class);
    Map applicationScope = newMock(Map.class);
    Map actions = new HashMap();
    Action action = new Action();
   
    expect(actionConfig.getModuleConfig()).andReturn(moduleConfig);
    expect(moduleConfig.getPrefix()).andReturn("prefix");
    expect(actionContext.getApplicationScope()).andReturn(applicationScope);
    expect(applicationScope.get("actionsprefix")).andReturn(actions);
View Full Code Here

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(NavigableFormRenderBean.class);
    NavigableFormController controller = (NavigableFormController) action;
    assert controller.getNavigationHolder() != null;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(SimpleLookupDispatchAction.class);
    BasicLookupDispatchController controller = (BasicLookupDispatchController) action;
    assert controller.internalGetKeyMethodMap() != null;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(ActionWithNoNavigate.class);
    BasicController controller = (BasicController) action;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(SimpleFormAction.class);
    BasicFormController controller = (BasicFormController) action;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(SimpleDispatchAction.class);
    BasicMappingDispatchController controller = (BasicMappingDispatchController) action;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(SimpleSubmitAction.class);
    BasicSubmitController controller = (BasicSubmitController) action;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(SimpleDispatchAction.class);
    NavigableMappingDispatchController controller = (NavigableMappingDispatchController) action;
    assert controller.getNavigationHolder() != null;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

TOP

Related Classes of org.apache.struts.action.Action

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.