Package org.strecks.injection.handler.impl

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


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

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

    HttpServletResponse response = createMock(HttpServletResponse.class);

    replay(response);

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

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

    verify(response);

    assert action.getResponse() != null;
    assert action.getResponse() == response;
  }
View Full Code Here

TOP

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

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.