Package org.mule.api

Examples of org.mule.api.MuleMessage.removeProperty()


        filter.setMuleContext(muleContext);

        MuleMessage message = new DefaultMuleMessage("blah", muleContext);

        assertTrue(!filter.accept(message));
        message.removeProperty("foo");
        assertTrue(!filter.accept(message));
        message.setOutboundProperty("foo", "car");
        assertTrue(filter.accept(message));
    }
   
View Full Code Here


        filter.setMuleContext(muleContext);

        MuleMessage message = new DefaultMuleMessage("blah", muleContext);

        assertTrue(!filter.accept(message));
        message.removeProperty("foo");
        assertTrue(!filter.accept(message));
        message.setInvocationProperty("foo", "car");
        assertTrue(filter.accept(message));
    }
View Full Code Here

    {
        MessagePropertyFilter filter = new MessagePropertyFilter("foo!=null");
        MuleMessage message = new DefaultMuleMessage("blah", muleContext);

        assertFalse(filter.accept(message));
        message.removeProperty("foo");
        assertFalse(filter.accept(message));
        message.setOutboundProperty("foo", "car");
        assertTrue("Filter didn't accept the message", filter.accept(message));
    }
View Full Code Here

        message.setOutboundProperty("foo", "bar");
        assertTrue("Filter didn't accept the message", filter.accept(message));
        filter.setCaseSensitive(false);

        filter = new MessagePropertyFilter("foo2 =null");
        message.removeProperty("foo2");
        assertTrue("Filter didn't accept the message", filter.accept(message));

        filter = new MessagePropertyFilter("foo2 =");
        message.setOutboundProperty("foo2", "");
        assertTrue("Filter didn't accept the message", filter.accept(message));
View Full Code Here

        filter = new MessagePropertyFilter("foo2 =");
        message.setOutboundProperty("foo2", "");
        assertTrue("Filter didn't accept the message", filter.accept(message));

        message.removeProperty("foo2");
        assertFalse(filter.accept(message));
    }


    public void testMessagePropertyFilterPropertyExists() throws Exception
View Full Code Here

    public void testFindPropertiesInAnyScope() throws Exception
    {
        MuleMessage message = createMuleMessage();
        //Not sure why this test adds this property
        message.removeProperty("MuleMessage", PropertyScope.OUTBOUND);

        //We need a session and current event for this test
        RequestContext.setEvent(new DefaultMuleEvent(
                message,
                getTestInboundEndpoint("foo"),
View Full Code Here

        assertEquals(1, message.getSessionPropertyNames().size());

        String value = message.findPropertyInAnyScope("foo", null);
        assertEquals("fooOutbound", value);

        message.removeProperty("foo", PropertyScope.OUTBOUND);

        value = message.findPropertyInAnyScope("foo", null);
        assertEquals("fooInvocation", value);

        message.removeProperty("foo", PropertyScope.INVOCATION);
View Full Code Here

        message.removeProperty("foo", PropertyScope.OUTBOUND);

        value = message.findPropertyInAnyScope("foo", null);
        assertEquals("fooInvocation", value);

        message.removeProperty("foo", PropertyScope.INVOCATION);

        value = message.findPropertyInAnyScope("foo", null);
        assertEquals("fooSession", value);
        message.removeProperty("foo", PropertyScope.SESSION);
View Full Code Here

        message.removeProperty("foo", PropertyScope.INVOCATION);

        value = message.findPropertyInAnyScope("foo", null);
        assertEquals("fooSession", value);
        message.removeProperty("foo", PropertyScope.SESSION);

        value = message.findPropertyInAnyScope("foo", null);
        assertEquals("fooInbound", value);

        value = message.findPropertyInAnyScope("bar", null);
View Full Code Here

        //Note that we cannot write to the Inbound scope, its read only
        message.setProperty("Prop", "invocation", PropertyScope.INVOCATION);
        message.setProperty("Prop", "outbound", PropertyScope.OUTBOUND);

        assertEquals("outbound", message.getProperty("Prop", PropertyScope.OUTBOUND));
        message.removeProperty("Prop", PropertyScope.OUTBOUND);

        assertEquals("invocation", message.getProperty("Prop", PropertyScope.INVOCATION));
        message.removeProperty("Prop", PropertyScope.INVOCATION);

        assertEquals("session", message.getProperty("Prop", PropertyScope.SESSION));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.