Package org.strecks.injection.handler.impl

Examples of org.strecks.injection.handler.impl.ActionWithRequest


  @Test
  public void test()
  {
    InjectionAnnotationReader c = new InjectionAnnotationReader();
    ActionWithRequest action = new ActionWithRequest();

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

    HttpServletRequest request = createMock(HttpServletRequest.class);

    replay(request);

    InjectionWrapper inputWrapper = inputs.get("request");

    ActionContext injectionContext = new TestContextImpl(request);
    inputWrapper.inject(action, injectionContext);

    verify(request);

    assert action.getRequest() != null;
    assert action.getRequest() == request;
  }
View Full Code Here

TOP

Related Classes of org.strecks.injection.handler.impl.ActionWithRequest

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.