Package org.apache.tapestry5.ioc

Examples of org.apache.tapestry5.ioc.Invocation


    }

    @Test
    public void get_parameter_type() throws Exception
    {
        Invocation iv = new TestInvocation(Subject.class.getMethod("execute", Runnable.class));

        assertEquals(iv.getParameterCount(), 1);
        assertSame(iv.getParameterType(0), Runnable.class);

    }
View Full Code Here


    }

    @Test
    public void to_string() throws Exception
    {
        Invocation iv = new TestInvocation(Runnable.class.getMethod("run"));

        assertEquals(iv.toString(), "Invocation[public abstract void java.lang.Runnable.run()]");
    }
View Full Code Here

    @Test
    public void override_exception() throws Exception
    {
        SQLException se = new SQLException();

        Invocation iv = new TestInvocation(Subject.class.getMethod("go"));

        iv.overrideThrown(se);

        assertTrue(iv.isFail());
        assertSame(iv.getThrown(Exception.class), se);
    }
View Full Code Here

    @Test
    public void get_thrown_returns_null_if_not_a_match() throws Exception
    {
        SQLException se = new SQLException();

        Invocation iv = new TestInvocation(Subject.class.getMethod("go"));

        iv.overrideThrown(se);

        assertNull(iv.getThrown(RuntimeException.class));
    }
View Full Code Here

    public void override_result_clears_exception() throws Exception
    {
        SQLException se = new SQLException();
        Integer override = new Integer(23);

        Invocation iv = new TestInvocation(Subject.class.getMethod("count"));

        iv.overrideThrown(se);

        assertTrue(iv.isFail());

        iv.overrideResult(override);
        assertFalse(iv.isFail());
        assertSame(iv.getResult(), override);
    }
View Full Code Here

    @Test
    public void invalid_exception_for_override() throws Exception
    {
        SQLException se = new SQLException();

        Invocation iv = new TestInvocation(Runnable.class.getMethod("run"));

        try
        {
            iv.overrideThrown(se);
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(ex.getMessage(),
View Full Code Here

    }

    @Test
    public void get_parameter_type() throws Exception
    {
        Invocation iv = new TestInvocation(Subject.class.getMethod("execute", Runnable.class));

        assertEquals(iv.getParameterCount(), 1);
        assertSame(iv.getParameterType(0), Runnable.class);
    }
View Full Code Here

        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        FormSupport fs = mockFormSupport();
View Full Code Here

    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        FormSupport fs = mockFormSupport();
View Full Code Here

    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        FormSupport fs = mockFormSupport();
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.Invocation

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.