Package org.apache.tapestry5

Examples of org.apache.tapestry5.ComponentEventCallback


        ComponentPageElementResources resources = mockResources();

        logger.debug(eq(TapestryMarkers.EVENT_HANDLER_METHOD), isA(String.class));

        ComponentEventCallback handler = mockComponentEventHandler();

        train_handleResult(handler, result, true);

        replay();
View Full Code Here


    @Test
    public void store_result_and_continue()
    {
        Object result = new Object();
        String methodDescription = "foo.Bar.baz()";
        ComponentEventCallback handler = mockComponentEventHandler();
        Logger logger = mockLogger();
        ComponentPageElementResources resources = mockResources();
        ComponentModel model = mockComponentModel();

        train_isDebugEnabled(logger, true);
View Full Code Here

    }

    @Test
    public void store_null_result_does_not_abort_or_invoke_handler()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        Logger logger = mockLogger();
        ComponentModel model = mockComponentModel();

        train_isDebugEnabled(logger, true);
        logger.debug(eq(TapestryMarkers.EVENT_HANDLER_METHOD), isA(String.class));
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test
    public void store_result_when_aborted_is_failure()
    {
        Object result = new Object();
        ComponentEventCallback handler = mockComponentEventHandler();
        Logger logger = mockLogger();
        ComponentPageElementResources resources = mockResources();
        ComponentModel model = mockComponentModel();

        train_isDebugEnabled(logger, true);
        EasyMock.expectLastCall().atLeastOnce();

        logger.debug(eq(TapestryMarkers.EVENT_HANDLER_METHOD), isA(String.class));

        EasyMock.expectLastCall().atLeastOnce();

        expect(handler.handleResult(result)).andReturn(true);

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler, resources, false, model, logger);
View Full Code Here

        return new IAnswer<Boolean>()
        {
            @SuppressWarnings("unchecked")
            public Boolean answer() throws Throwable
            {
                ComponentEventCallback handler = (ComponentEventCallback) EasyMock
                        .getCurrentArguments()[2];

                handler.handleResult(new Object[] { "foo", "bar" });

                return true;
            }
        };
    }
View Full Code Here

    }

    @Test
    public void matches_on_event_type()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();

        train_getCount(context, 0);

        replay();
View Full Code Here

    }

    @Test
    public void event_type_match_is_case_insensitive()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();

        train_getCount(context, 0);

        replay();
View Full Code Here

    }

    @Test
    public void matches_on_component_id()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();

        train_getCount(context, 0);

        replay();
View Full Code Here

    }

    @Test
    public void component_id_matches_are_case_insensitive()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();

        train_getCount(context, 0);

        replay();
View Full Code Here

    }

    @Test
    public void coerce_context()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        PageResources resources = mockPageResources();
        EventContext context = mockEventContext();
        Integer value = new Integer(27);

        train_toClass(resources, "java.lang.Integer", Integer.class);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ComponentEventCallback

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.