Package org.strecks.context.impl

Examples of org.strecks.context.impl.TestContextImpl


    replay(request);
    replay(session);

    RedirectBeforeInterceptor interceptor = new RedirectBeforeInterceptor();
    interceptor.beforeExecute(null, new TestContextImpl(request));

    verify(request);
    verify(session);

  }
View Full Code Here


    replay(request);
    replay(session);

    RedirectBeforeInterceptor interceptor = new RedirectBeforeInterceptor();
    interceptor.beforeExecute(null, new TestContextImpl(request));

    verify(request);
    verify(session);

  }
View Full Code Here

  public void testExecute() throws Exception
  {

    HttpServletRequest request = createMock(HttpServletRequest.class);
    ActionServlet servlet = createMock(ActionServlet.class);
    ActionContext actionContext = new TestContextImpl(request);

    replay(request);
    replay(servlet);

    SimpleControllerAction action = new SimpleControllerAction();
View Full Code Here

    replay(request);

    SimpleControllerAction action = new SimpleControllerAction();
    action.setInjectionHandlers(injectionHandlers);

    action.doInjection(actionBean, new TestContextImpl(request, null, context, null, null));

    // prove that the value has been injected
    assert actionBean.getParam().equals(3);

    verify(request);
View Full Code Here

  public void testFindForwardNavigationHolderNull()
  {
    SimpleControllerAction action = new SimpleControllerAction();
    ActionWithNavigate bean = new ActionWithNavigate();

    action.findActionForward(bean, new TestContextImpl());
  }
View Full Code Here

    NavigationHolder navigationHolder = new NavigationHolder(new PageNavigationHandler(),
        new DefaultNavigationHandlerFactory(), bean.getClass().getMethod("nextPage"));

    action.setNavigationHolder(navigationHolder);

    ViewAdapter viewAdapter = action.findActionForward(bean, new TestContextImpl(request));

    ActionForwardViewAdapter va = (ActionForwardViewAdapter) viewAdapter;
    assert (va.getActionForward() instanceof PageForward);

    verify(request);
View Full Code Here

    NavigationHolder navigationHolder = new NavigationHolder(new PageNavigationHandler(),
        new DefaultNavigationHandlerFactory(), bean.getClass().getMethod("nextPage"));

    action.setNavigationHolder(navigationHolder);

    assert null == action.findActionForward(bean, new TestContextImpl(request));

    verify(request);
  }
View Full Code Here

TOP

Related Classes of org.strecks.context.impl.TestContextImpl

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.