Package org.mule.tck.testmodels.fruit

Examples of org.mule.tck.testmodels.fruit.FruitLover


    public void testExplicitMethodMatchComplexObject() throws Exception
    {
        try
        {
            LegacyEntryPointResolverSet resolver = new LegacyEntryPointResolverSet();
            resolver.invoke(new FruitBowl(), getTestEventContext(new FruitLover("Mmmm")));
        }
        catch (MuleException e)
        {
            fail("Test should have passed: " + e);
        }
View Full Code Here


     * the default discovery should take place.
     */
    public void testMethodOverrideDoesNotFallback() throws Exception
    {
        EntryPointResolverSet resolverSet = new LegacyEntryPointResolverSet();
        RequestContext.setEvent(getTestEvent(new FruitLover("Yummy!")));

        // those are usually set on the endpoint and copied over to the message
        final String methodName = "nosuchmethod";
        final String propertyName = MuleProperties.MULE_METHOD_PROPERTY;
        RequestContext.getEventContext().getMessage().setOutboundProperty(propertyName, methodName);
View Full Code Here

     */
    public void testMethodOverrideIgnoredWithCallable() throws Exception
    {
        EntryPointResolverSet resolver = new LegacyEntryPointResolverSet();

        RequestContext.setEvent(getTestEvent(new FruitLover("Yummy!")));

        // those are usually set on the endpoint and copied over to the message
        RequestContext.getEventContext().getMessage().setOutboundProperty(METHOD_PROPERTY_NAME,
                                                                          INVALID_METHOD_NAME);

View Full Code Here

     */
    public void testMethodOverrideIgnoredWithEventContext() throws Exception
    {
        EntryPointResolverSet resolverSet = new LegacyEntryPointResolverSet();

        RequestContext.setEvent(getTestEvent(new FruitLover("Yummy!")));

        // those are usually set on the endpoint and copied over to the message
        final String methodName = "nosuchmethod";
        final String propertyName = MuleProperties.MULE_METHOD_PROPERTY;
        RequestContext.getEventContext().getMessage().setOutboundProperty(propertyName, methodName);
View Full Code Here

    }

    public void testExplicitMethodMatchComplexObject() throws Exception
    {
        ReflectionEntryPointResolver resolver = new ReflectionEntryPointResolver();
        InvocationResult result = resolver.invoke(new FruitBowl(), getTestEventContext(new FruitLover("Mmmm")));
        assertEquals(result.getState(), InvocationResult.State.SUCCESSFUL);
    }
View Full Code Here

    public void testExplicitMethodMatchComplexObject() throws Exception
    {
        try
        {
            LegacyEntryPointResolverSet resolver = new LegacyEntryPointResolverSet();
            resolver.invoke(new FruitBowl(), getTestEventContext(new FruitLover("Mmmm")));
        }
        catch (MuleException e)
        {
            fail("Test should have passed: " + e);
        }
View Full Code Here

     */
    @Test
    public void testMethodOverrideDoesNotFallback() throws Exception
    {
        EntryPointResolverSet resolverSet = new LegacyEntryPointResolverSet();
        RequestContext.setEvent(getTestEvent(new FruitLover("Yummy!")));

        // those are usually set on the endpoint and copied over to the message
        final String methodName = "nosuchmethod";
        final String propertyName = MuleProperties.MULE_METHOD_PROPERTY;
        RequestContext.getEventContext().getMessage().setOutboundProperty(propertyName, methodName);
View Full Code Here

    @Test
    public void testMethodOverrideIgnoredWithCallable() throws Exception
    {
        EntryPointResolverSet resolver = new LegacyEntryPointResolverSet();

        RequestContext.setEvent(getTestEvent(new FruitLover("Yummy!")));

        // those are usually set on the endpoint and copied over to the message
        RequestContext.getEventContext().getMessage().setOutboundProperty(METHOD_PROPERTY_NAME,
                                                                          INVALID_METHOD_NAME);
View Full Code Here

    @Test
    public void testMethodOverrideIgnoredWithEventContext() throws Exception
    {
        EntryPointResolverSet resolverSet = new LegacyEntryPointResolverSet();

        RequestContext.setEvent(getTestEvent(new FruitLover("Yummy!")));

        // those are usually set on the endpoint and copied over to the message
        final String methodName = "nosuchmethod";
        final String propertyName = MuleProperties.MULE_METHOD_PROPERTY;
        RequestContext.getEventContext().getMessage().setOutboundProperty(propertyName, methodName);
View Full Code Here

    @Test
    public void testExplicitMethodMatchComplexObject() throws Exception
    {
        ReflectionEntryPointResolver resolver = new ReflectionEntryPointResolver();
        InvocationResult result = resolver.invoke(new FruitBowl(), getTestEventContext(new FruitLover("Mmmm")));
        assertEquals(result.getState(), InvocationResult.State.SUCCESSFUL);
    }
View Full Code Here

TOP

Related Classes of org.mule.tck.testmodels.fruit.FruitLover

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.