Package org.apache.struts.action

Examples of org.apache.struts.action.ActionMapping


    BasicSubmitController action = new BasicSubmitController();
    ActionForward actionForward = new ActionForward();

    BasicSubmitAction actionBean = createStrictMock(BasicSubmitAction.class);
    ActionMapping mapping = createStrictMock(ActionMapping.class);
    DelegatingForm form = createStrictMock(DelegatingForm.class);
    HttpServletRequest request = createStrictMock(HttpServletRequest.class);

    expect(request.getAttribute(Globals.CANCEL_KEY)).andReturn(null);
    actionBean.preBind();
    form.bindInwards(actionBean);
    expect(actionBean.execute()).andReturn("success");
    expect(mapping.findForward("success")).andReturn(actionForward);

    replay(actionBean);
    replay(mapping);
    replay(form);
    replay(request);
View Full Code Here


    BasicSubmitController action = new BasicSubmitController();
    ActionForward actionForward = new ActionForward();

    BasicSubmitAction actionBean = createStrictMock(BasicSubmitAction.class);
    ActionMapping mapping = createStrictMock(ActionMapping.class);
    DelegatingForm form = createStrictMock(DelegatingForm.class);
    HttpServletRequest request = createStrictMock(HttpServletRequest.class);

    expect(request.getAttribute(Globals.CANCEL_KEY)).andReturn(Boolean.TRUE);
    expect(actionBean.cancel()).andReturn("success");
    expect(mapping.findForward("success")).andReturn(actionForward);

    replay(actionBean);
    replay(mapping);
    replay(form);
    replay(request);
View Full Code Here

    BasicSubmitController action = new BasicSubmitController();
    ActionForward actionForward = new ActionForward();

    BasicSubmitAction actionBean = createStrictMock(BasicSubmitAction.class);
    ActionMapping mapping = createStrictMock(ActionMapping.class);
    BasicActionForm form = createStrictMock(BasicActionForm.class);
    HttpServletRequest request = createStrictMock(HttpServletRequest.class);

    expect(request.getAttribute(Globals.CANCEL_KEY)).andReturn(null);
    expect(actionBean.execute()).andReturn("success");
    expect(mapping.findForward("success")).andReturn(actionForward);

    replay(actionBean);
    replay(mapping);
    replay(form);
    replay(request);
View Full Code Here

    BasicSubmitController action = new BasicSubmitController();
    ActionForward actionForward = new ActionForward();

    BasicSubmitAction actionBean = createStrictMock(BasicSubmitAction.class);
    ActionMapping mapping = createStrictMock(ActionMapping.class);
    BasicActionForm form = createStrictMock(BasicActionForm.class);
    HttpServletRequest request = createStrictMock(HttpServletRequest.class);

    expect(request.getAttribute(Globals.CANCEL_KEY)).andReturn(Boolean.TRUE);
    expect(actionBean.cancel()).andReturn("success");
    expect(mapping.findForward("success")).andReturn(actionForward);

    replay(actionBean);
    replay(mapping);
    replay(form);
    replay(request);
View Full Code Here

    action.setNavigationHolder(navigationReader.getNavigationHolder());

    ActionForward actionForward = new ActionForward();

    SimpleDispatchAction actionBean = createMock(SimpleDispatchAction.class);
    ActionMapping mapping = createMock(ActionMapping.class);
    HttpServletRequest request = createMock(HttpServletRequest.class);

    expect(mapping.getParameter()).andReturn("insert");
    actionBean.insert();
    expect(actionBean.getSuccessResult()).andReturn("insertResult");
    expect(mapping.findForward("insertResult")).andReturn(actionForward);

    replay(actionBean);
    replay(mapping);
    replay(request);
View Full Code Here

  {

    ActionForward actionForward = new ActionForward();

    SimpleDispatchAction actionBean = createMock(SimpleDispatchAction.class);
    ActionMapping mapping = createMock(ActionMapping.class);
    HttpServletRequest request = createMock(HttpServletRequest.class);

    expect(mapping.getParameter()).andReturn("method");
    expect(request.getParameter("method")).andReturn("insert");
    actionBean.insert();
    expect(actionBean.getSuccessResult()).andReturn("insertResult");
    expect(mapping.findForward("insertResult")).andReturn(actionForward);

    replay(actionBean);
    replay(mapping);
    replay(request);
View Full Code Here

  {

    ActionForward actionForward = new ActionForward();

    SimpleDispatchAction actionBean = createMock(SimpleDispatchAction.class);
    ActionMapping mapping = createMock(ActionMapping.class);
    HttpServletRequest request = createMock(HttpServletRequest.class);

    expect(mapping.getParameter()).andReturn("method");
    expect(request.getParameter("method")).andReturn(null);
    actionBean.unspecified();
    expect(actionBean.getSuccessResult()).andReturn("unspecifiedResult");
    expect(mapping.findForward("unspecifiedResult")).andReturn(actionForward);

    replay(actionBean);
    replay(mapping);
    replay(request);
View Full Code Here

  @Test
  public void testNoParameter()
  {

    SimpleDispatchAction actionBean = createMock(SimpleDispatchAction.class);
    ActionMapping mapping = createMock(ActionMapping.class);
    HttpServletRequest request = createMock(HttpServletRequest.class);

    expect(mapping.getParameter()).andReturn(null);
    expect(mapping.getPath()).andReturn("path");

    replay(actionBean);
    replay(mapping);
    replay(request);
View Full Code Here

    ActionWithActionMapping action = new ActionWithActionMapping();

    c.readAnnotations(action.getClass());
    Map<String, InjectionWrapper> inputs = c.getInjectionMap();

    ActionMapping mapping = createMock(ActionMapping.class);

    replay(mapping);

    InjectionWrapper inputWrapper = inputs.get("actionMapping");
View Full Code Here

  @Test
  public void testPreValidate()
  {

    HttpServletRequest request = createStrictMock(HttpServletRequest.class);
    ActionMapping mapping = createStrictMock(ActionMapping.class);
    HttpSession session = createStrictMock(HttpSession.class);

    replay(mapping);
    replay(request);
    replay(session);
View Full Code Here

TOP

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

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.