Package com.opensymphony.xwork2.mock

Examples of com.opensymphony.xwork2.mock.MockActionProxy


    context.put(PortletActionConstants.PHASE, PortletActionConstants.RENDER_PHASE);
    context.put(PortletActionConstants.MODE_NAMESPACE_MAP, modeMap);
    context.put(StrutsStatics.STRUTS_PORTLET_CONTEXT, portletContext);

    actionInvocation = new MockActionInvocation();
    actionProxy = new MockActionProxy();

    actionInvocation.setAction(new Object());
    actionInvocation.setProxy(actionProxy);
    actionInvocation.setStack(stack);
View Full Code Here


   
    URL url = new URL(stack, new PortletServletRequest(request, null),
        new PortletServletResponse(response));

    MockActionInvocation ai = new MockActionInvocation();
    MockActionProxy ap = new MockActionProxy();
    ap.setActionName("testAction");
    ap.setNamespace("/current_namespace");
    ai.setProxy(ap);
    ai.setStack(stack);
    ai.setAction(new Object());
    ctx.setActionInvocation(ai);
View Full Code Here

    Form form = new Form(stack, new PortletServletRequest(request, null),
        new PortletServletResponse(response));

    MockActionInvocation ai = new MockActionInvocation();
    MockActionProxy ap = new MockActionProxy();
    ap.setActionName("testAction");
    ap.setNamespace("/current_namespace");
    ai.setProxy(ap);
    ai.setStack(stack);
    ai.setAction(new Object());
    ctx.setActionInvocation(ai);
View Full Code Here

   
    TestObject obj = new TestObject();
    obj.someProperty = "EvaluatedProperty";
    stack.push(obj);
    MockActionInvocation ai = new MockActionInvocation();
    MockActionProxy ap = new MockActionProxy();
    ap.setActionName("testAction");
    ap.setNamespace("");
    ai.setProxy(ap);
    ai.setStack(stack);
    ctx.setActionInvocation(ai);
   
    URL url = new URL(stack, new PortletServletRequest(request, null),
View Full Code Here

   
    TestObject obj = new TestObject();
    obj.someProperty = "EvaluatedProperty";
    stack.push(obj);
    MockActionInvocation ai = new MockActionInvocation();
    MockActionProxy ap = new MockActionProxy();
    ap.setActionName("testAction");
    ap.setNamespace("");
    ai.setProxy(ap);
    ai.setStack(stack);
    ctx.setActionInvocation(ai);
   
    URL url = new URL(stack, new PortletServletRequest(request, null),
View Full Code Here

    private Mock mock;
    private PrepareInterceptor interceptor;

    public void testPrepareCalledDefault() throws Exception {
        MockActionInvocation mai = new MockActionInvocation();
        MockActionProxy mockActionProxy = new MockActionProxy();
        mockActionProxy.setMethod("execute");
        mai.setProxy(mockActionProxy);
        mai.setAction(mock.proxy());
        mock.expect("prepare");

        interceptor.intercept(mai);
View Full Code Here

        interceptor.intercept(mai);
    }

    public void testPrepareCalledFalse() throws Exception {
        MockActionInvocation mai = new MockActionInvocation();
        MockActionProxy mockActionProxy = new MockActionProxy();
        mockActionProxy.setMethod("execute");
        mai.setProxy(mockActionProxy);
        mai.setAction(mock.proxy());

        interceptor.setAlwaysInvokePrepare("false");
        interceptor.intercept(mai);
View Full Code Here

        interceptor.intercept(mai);
    }

    public void testPrepareCalledTrue() throws Exception {
        MockActionInvocation mai = new MockActionInvocation();
        MockActionProxy mockActionProxy = new MockActionProxy();
        mockActionProxy.setMethod("execute");
        mai.setProxy(mockActionProxy);
        mai.setAction(mock.proxy());
        mock.expect("prepare");

        interceptor.setAlwaysInvokePrepare("true");
View Full Code Here

        interceptor.intercept(mai);
    }

    public void testFirstCallPrepareDoIsTrue() throws Exception {
        MockActionInvocation mai = new MockActionInvocation();
        MockActionProxy mockActionProxy = new MockActionProxy();
        mockActionProxy.setMethod("submit");
        mai.setProxy(mockActionProxy);
        mai.setAction(mock.proxy());
        mock.expect("prepareSubmit");
        mock.expect("prepare");
View Full Code Here

        interceptor.intercept(mai);
    }

    public void testFirstCallPrepareDoIsFalse() throws Exception {
        MockActionInvocation mai = new MockActionInvocation();
        MockActionProxy mockActionProxy = new MockActionProxy();
        mockActionProxy.setMethod("submit");
        mai.setProxy(mockActionProxy);
        mai.setAction(mock.proxy());
        mock.expect("prepare");
        mock.expect("prepareSubmit");
View Full Code Here

TOP

Related Classes of com.opensymphony.xwork2.mock.MockActionProxy

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.