Package org.mule.construct

Examples of org.mule.construct.Validator$ErrorExpressionTransformerMessageProcessor


public class ValidatorBuilderTestCase extends AbstractMuleTestCase
{
    public void testConfigurationWithoutErrorExpression() throws Exception
    {
        final Validator validator = new ValidatorBuilder().name("test-validator-no-error")
            .inboundAddress("test://foo.in")
            .validationFilter(new PayloadTypeFilter(Integer.class))
            .ackExpression("#[string:GOOD:#[message:payload]]")
            .nackExpression("#[string:BAD:#[message:payload]]")
            .outboundAddress("test://foo.out")
            .exceptionStrategy(new DefaultMessagingExceptionStrategy(muleContext, true))
            .build(muleContext);

        assertEquals("test-validator-no-error", validator.getName());
    }
View Full Code Here


        assertEquals("test-validator-no-error", validator.getName());
    }

    public void testFullConfiguration() throws Exception
    {
        final Validator validator = new ValidatorBuilder().name("test-validator-full")
            .inboundAddress("test://foo.in")
            .validationFilter(new PayloadTypeFilter(Integer.class))
            .ackExpression("#[string:GOOD:#[message:payload]]")
            .nackExpression("#[string:BAD:#[message:payload]]")
            .errorExpression("#[string:ERROR:#[message:payload]]")
            .outboundAddress("test://foo.out")
            .exceptionStrategy(new DefaultMessagingExceptionStrategy(muleContext, true))
            .build(muleContext);

        assertEquals("test-validator-full", validator.getName());
    }
View Full Code Here

    }

    @Override
    protected Validator buildFlowConstruct(MuleContext muleContext) throws MuleException
    {
        return new Validator(name, muleContext, getOrBuildInboundEndpoint(muleContext),
            getOrBuildOutboundEndpoint(muleContext), validationFilter, ackExpression, nackExpression,
            errorExpression);
    }
View Full Code Here

    }

    @Override
    protected Validator buildFlowConstruct(MuleContext muleContext) throws MuleException
    {
        return new Validator(name, muleContext, getOrBuildInboundEndpoint(muleContext),
            getOrBuildOutboundEndpoint(muleContext), validationFilter, ackExpression, nackExpression,
            errorExpression);
    }
View Full Code Here

public class ValidatorBuilderTestCase extends AbstractMuleContextTestCase
{
    @Test
    public void testConfigurationWithoutErrorExpression() throws Exception
    {
        final Validator validator = new ValidatorBuilder().name("test-validator-no-error")
            .inboundAddress("test://foo.in")
            .validationFilter(new PayloadTypeFilter(Integer.class))
            .ackExpression("#[string:GOOD:#[message:payload]]")
            .nackExpression("#[string:BAD:#[message:payload]]")
            .outboundAddress("test://foo.out")
            .exceptionStrategy(new DefaultMessagingExceptionStrategy(muleContext))
            .build(muleContext);

        assertEquals("test-validator-no-error", validator.getName());
    }
View Full Code Here

    }

    @Test
    public void testFullConfiguration() throws Exception
    {
        final Validator validator = new ValidatorBuilder().name("test-validator-full")
            .inboundAddress("test://foo.in")
            .validationFilter(new PayloadTypeFilter(Integer.class))
            .ackExpression("#[string:GOOD:#[message:payload]]")
            .nackExpression("#[string:BAD:#[message:payload]]")
            .errorExpression("#[string:ERROR:#[message:payload]]")
            .outboundAddress("test://foo.out")
            .exceptionStrategy(new DefaultMessagingExceptionStrategy(muleContext))
            .build(muleContext);

        assertEquals("test-validator-full", validator.getName());
    }
View Full Code Here

TOP

Related Classes of org.mule.construct.Validator$ErrorExpressionTransformerMessageProcessor

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.