Package org.strecks.injection.handler.impl

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


  @Test
  public void testDefaultBundle()
  {

    ActionWithDefaultMessageResources action = new ActionWithDefaultMessageResources();
    reader.readAnnotations(action.getClass());
    inputs = reader.getInjectionMap();

    expect(request.getAttribute(Globals.MODULE_KEY)).andReturn(moduleConfig);
    expect(moduleConfig.getPrefix()).andReturn("");
    expect(context.getAttribute(Globals.MESSAGES_KEY)).andReturn(messageResources);

    replay(context);
    replay(request);
    replay(moduleConfig);
    replay(messageResources);

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

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

    verify(context);
    verify(request);
    verify(moduleConfig);
    verify(messageResources);

    assert action.getResources() != null;

  }
View Full Code Here

TOP

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

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.