Package com.alibaba.citrus.service.moduleloader.impl.adapter

Examples of com.alibaba.citrus.service.moduleloader.impl.adapter.ActionEventAdapter.execute()


                                    + ": method execute has 2 parameters, but no DataResolvers defined."));
        }

        // action.doMyEvent(无参数) - 正常执行
        ActionEventAdapter aeAdapter = (ActionEventAdapter) moduleLoaderService.getModule("action", "myAction");
        aeAdapter.execute();

        // action.doMyEvent(带参数)
        try {
            moduleLoaderService.getModule("action", "myParameterizedAction");
            fail();
View Full Code Here


        dbAdapter.execute();
        assertEquals("MyParameterizedScreen.execute(request, 111)", request.getAttribute("screenLog"));

        // action.doMyEvent(无参数) - 正常执行
        ActionEventAdapter aeAdapter = (ActionEventAdapter) moduleLoaderService.getModule("action", "myAction");
        aeAdapter.execute();
        assertEquals("MyAction.doMyEvent()", request.getAttribute("actionLog"));

        // action.doMyEvent(带参数)
        aeAdapter = (ActionEventAdapter) moduleLoaderService.getModule("action", "myParameterizedAction");
        aeAdapter.execute();
View Full Code Here

        aeAdapter.execute();
        assertEquals("MyAction.doMyEvent()", request.getAttribute("actionLog"));

        // action.doMyEvent(带参数)
        aeAdapter = (ActionEventAdapter) moduleLoaderService.getModule("action", "myParameterizedAction");
        aeAdapter.execute();
        assertEquals("MyParameterizedAction.doMyEvent(request, 222)", request.getAttribute("actionLog"));

        // action.doMyEvent(带primitive参数)
        getInvocationContext("/app1?event_submit_do_my_event_primitive=yes");
        initRequestContext(factory);
View Full Code Here

        // action.doMyEvent(带primitive参数)
        getInvocationContext("/app1?event_submit_do_my_event_primitive=yes");
        initRequestContext(factory);

        aeAdapter = (ActionEventAdapter) moduleLoaderService.getModule("action", "myParameterizedAction");
        aeAdapter.execute();
        assertEquals("MyParameterizedAction.doMyEventPrimitive(request, 0)", request.getAttribute("actionLog"));
    }

    @Test
    public void skipScreen() throws Exception {
View Full Code Here

        initRequestContext(factory);

        // action.doMyEvent(@skip) - 被skip后,不执行,但before/afterExecution仍执行。
        ActionEventAdapter aeAdapter = (ActionEventAdapter) moduleLoaderService
                .getModule("action", "mySkippableAction");
        aeAdapter.execute();

        assertEquals(null /* 不是"result is null" */, request.getAttribute("actionLog"));
        assertEquals("result is haha", request.getAttribute("actionLog.before"));
        assertEquals("result is haha", request.getAttribute("actionLog.after"));
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.