Package org.strecks.injection.internal

Examples of org.strecks.injection.internal.InjectionWrapper


    expect(session.getAttribute("autoCreateSession")).andReturn(null);

    replay(request);
    replay(session);

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

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

    verify(request);
    verify(session);

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


    expect(session.getAttribute("nonAutoCreateSession")).andReturn(null);

    replay(request);
    replay(session);

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

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

    verify(request);
    verify(session);

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

    session.setAttribute(eq("autoCreateSession"), anyObject());

    replay(request);
    replay(session);

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

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

    verify(request);
    verify(session);

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

    expect(session.getAttribute("requiredSessionAttribute")).andReturn(null);

    replay(request);
    replay(session);

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

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

    verify(request);
    verify(session);

  }
View Full Code Here

    expect(session.getAttribute("requiredAutoCreateSessionAttribute")).andReturn(null);

    replay(request);
    replay(session);

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

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

    verify(request);
    verify(session);

  }
View Full Code Here

    expect(request.getAttribute("autoCreateRequest")).andReturn(null);

    replay(request);

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

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

    verify(request);

    assert action.getAutoCreateRequest() != null;
    assert action.getAutoCreateRequest() instanceof QueryResults;
View Full Code Here

    expect(request.getAttribute("nonAutoCreateRequest")).andReturn(null);

    replay(request);

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

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

    verify(request);

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

    InjectionAnnotationReader c = new InjectionAnnotationReader();
    ActionWithWebHelper action = new ActionWithWebHelper();

    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

    expect(request.getAttribute(InfrastructureKeys.REDIRECT_HELPER)).andReturn(redirectHelper);

    replay(request);
    replay(redirectHelper);

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

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

    verify(request);
    verify(redirectHelper);

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

    request.setAttribute(eq(InfrastructureKeys.REDIRECT_HELPER), isA(RedirectHelper.class));

    replay(request);
    replay(redirectHelper);

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

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

    verify(request);
    verify(redirectHelper);

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

TOP

Related Classes of org.strecks.injection.internal.InjectionWrapper

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.