Package org.strecks.action.basic.impl

Examples of org.strecks.action.basic.impl.SimpleDispatchAction


  {

    BasicDispatchController action = new BasicDispatchController();
    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");
    expect(actionBean.insert()).andReturn("insertResult");
    expect(mapping.findForward("insertResult")).andReturn(actionForward);

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


  {

    BasicDispatchController action = new BasicDispatchController();
    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);
    expect(actionBean.unspecified()).andReturn("unspecifiedResult");
    expect(mapping.findForward("unspecifiedResult")).andReturn(actionForward);

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

  public void testNoParameter()
  {

    BasicDispatchController action = new BasicDispatchController();

    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");
View Full Code Here

  {

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

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

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

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

TOP

Related Classes of org.strecks.action.basic.impl.SimpleDispatchAction

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.