Package org.apache.tapestry

Examples of org.apache.tapestry.ComponentEventHandler


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

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

                return true;
            }
        };
View Full Code Here


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

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

                return true;
            }
        };
View Full Code Here

    }

    @Test
    public void matches_on_event_type()
    {
        ComponentEventHandler handler = mockComponentEventHandler();

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
                _coercer);
View Full Code Here

    }

    @Test
    public void event_type_match_is_case_insensitive()
    {
        ComponentEventHandler handler = mockComponentEventHandler();

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
                _coercer);
View Full Code Here

    }

    @Test
    public void matches_on_component_id()
    {
        ComponentEventHandler handler = mockComponentEventHandler();

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
                _coercer);
View Full Code Here

    }

    @Test
    public void component_id_matches_are_case_insensitive()
    {
        ComponentEventHandler handler = mockComponentEventHandler();

        replay();
        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
                _coercer);
View Full Code Here

    }

    @Test
    public void coerce_context()
    {
        ComponentEventHandler handler = mockComponentEventHandler();

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", new String[]
        { "27" }, handler, _coercer);
View Full Code Here

    }

    @Test
    public void coerce_when_not_enough_context()
    {
        ComponentEventHandler handler = mockComponentEventHandler();
        Component component = mockComponent();

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", new String[]
View Full Code Here

    }

    @Test
    public void unable_to_coerce()
    {
        ComponentEventHandler handler = mockComponentEventHandler();
        Component component = mockComponent();

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", new String[]
View Full Code Here

    {
        Object result = new Object();
        String methodDescription = "foo.Bar.baz()";
        Component component = mockComponent();

        ComponentEventHandler handler = mockComponentEventHandler();

        train_handleResult(handler, result, component, methodDescription, true);

        replay();
View Full Code Here

TOP

Related Classes of org.apache.tapestry.ComponentEventHandler

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.