Package org.strecks.injection.internal

Examples of org.strecks.injection.internal.InjectionWrapper


    expect(session.getAttribute(InfrastructureKeys.REDIRECT_PARAMETERS)).andReturn(map);

    replay(request);
    replay(session);

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

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

    verify(request);
    verify(session);

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


    expect(session.getAttribute(InfrastructureKeys.REDIRECT_PARAMETERS)).andReturn(null);

    replay(request);
    replay(session);

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

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

    verify(request);
    verify(session);

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

    expect(request.getSession(false)).andReturn(null);

    replay(request);

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

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

    verify(request);

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

    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

    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

    expect(request.getParameter("integerInput")).andReturn(null);

    replay(request);

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

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

    verify(request);

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

    expect(request.getParameter("integerInput")).andReturn("1");

    replay(request);

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

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

    verify(request);

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

    expect(request.getParameter("longInput")).andReturn(null);

    replay(request);

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

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

    verify(request);

  }
View Full Code Here

    expect(request.getParameter("integerInput")).andReturn("1");
    expect(request.getParameter("converted_long")).andReturn("2");

    replay(request);

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

    inputWrapper.inject(action, new TestContextImpl(request));

    inputWrapper = inputs.get("convertedLongInput");

    inputWrapper.inject(action, new TestContextImpl(request));

    verify(request);

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

    ActionMapping mapping = createMock(ActionMapping.class);

    replay(mapping);

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

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

    verify(mapping);

    assert action.getActionMapping() != null;
    assert action.getActionMapping() == mapping;
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.