Package org.strecks.injection.handler.impl

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


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

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

    ServletContext context = createMock(ServletContext.class);

    replay(context);

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

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

    verify(context);

    assert action.getContext() != null;
    assert action.getContext() == context;
  }
View Full Code Here

TOP

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

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.