Package org.mule.munit.mel.assertions

Examples of org.mule.munit.mel.assertions.MessageMatchingAssertionMelFunction


            {
                return muleMessage.getOutboundAttachment(param) != null;
            }
        }));

        context.declareFunction("messageInboundProperty", new MessageMatchingAssertionMelFunction(new ElementMatcherFactory()
        {
            @Override
            public ElementMatcher build(String elementName, MuleMessage muleMessage)
            {
                return new ElementMatcher(muleMessage.getInboundProperty(elementName));
            }
        }));

        context.declareFunction("messageOutboundProperty", new MessageMatchingAssertionMelFunction(new ElementMatcherFactory()
        {
            @Override
            public ElementMatcher build(String elementName, MuleMessage muleMessage)
            {
                return new ElementMatcher(muleMessage.getOutboundProperty(elementName));
            }
        }));


        context.declareFunction("messageInvocationProperty", new MessageMatchingAssertionMelFunction(new ElementMatcherFactory()
        {
            @Override
            public ElementMatcher build(String elementName, MuleMessage muleMessage)
            {
                return new ElementMatcher(muleMessage.getInvocationProperty(elementName));
            }
        }));

        context.declareFunction("messageInboundAttachment", new MessageMatchingAssertionMelFunction(new ElementMatcherFactory()
        {
            @Override
            public ElementMatcher build(String elementName, MuleMessage muleMessage)
            {
                return new ElementMatcher(muleMessage.getInboundAttachment(elementName));
            }
        }));

        context.declareFunction("messageOutboundAttachment", new MessageMatchingAssertionMelFunction(new ElementMatcherFactory()
        {
            @Override
            public ElementMatcher build(String elementName, MuleMessage muleMessage)
            {
                return new ElementMatcher(muleMessage.getOutboundAttachment(elementName));
View Full Code Here


        @Override
        public boolean matches(Object o)
        {
            if (o.getClass().isAssignableFrom(functionClass))
            {
                MessageMatchingAssertionMelFunction function = (MessageMatchingAssertionMelFunction) o;
                return commandValidator.validate(function.getCommand());
            }
            else
            {
                return false;
            }
View Full Code Here

TOP

Related Classes of org.mule.munit.mel.assertions.MessageMatchingAssertionMelFunction

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.