Package org.strecks.context

Examples of org.strecks.context.ActionContext


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

    ActionContext injectionContext = new TestContextImpl(request, null, context, null, null);

    inputWrapper.inject(action, injectionContext);

    assert action.getWebHelper() != null;
View Full Code Here


    replay(request);
    replay(redirectHelper);

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

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

    verify(request);
    verify(redirectHelper);
View Full Code Here

    replay(request);
    replay(redirectHelper);

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

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

    verify(request);
    verify(redirectHelper);
View Full Code Here

    Map<String, InjectionWrapper> injectionHandlers = c.getInjectionMap();
    ActionForm actionForm = new SimpleForm();

    InjectionWrapper inputWrapper = injectionHandlers.get("actionForm");

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

    assert action.getActionForm() != null;
    assert action.getActionForm() == actionForm;
  }
View Full Code Here

    ActionForm actionForm = new SimpleForm();
    DelegatingForm delegator = new DelegatingForm(actionForm);

    InjectionWrapper inputWrapper = injectionHandlers.get("actionForm");

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

    assert action.getActionForm() != null;
    assert action.getActionForm() == actionForm;
  }
View Full Code Here

    replay(moduleConfig);
    replay(messageResources);

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

    ActionContext injectionContext = new TestContextImpl(request, null, context, null, null);
    inputWrapper.inject(action, injectionContext);
    MessageResourcesHelper namedHelper = action.getNamedHelper();
   
    namedHelper.getMessage("some.key");
   
View Full Code Here

    replay(moduleConfig);
    replay(messageResources);

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

    ActionContext injectionContext = new TestContextImpl(request, null, context, null, null);
    inputWrapper.inject(action, injectionContext);
    MessageResourcesHelper defaultHelper = action.getDefaultHelper();
    defaultHelper.getMessage("some.key");

    verify(context);
View Full Code Here

    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);
View Full Code Here

    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);
View Full Code Here

   
    replay(request);

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

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

    verify(request);

    assert action.getLocale() != null;
View Full Code Here

TOP

Related Classes of org.strecks.context.ActionContext

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.