assertTrue("Filter didn't accept the message", filter.accept(message));
}
public void testMessagePropertyFilterWithURL() throws Exception
{
DefaultMuleMessage message = new DefaultMuleMessage("blah", muleContext);
RequestContext.setEvent(getTestEvent(message));
MessagePropertyFilter filter = new MessagePropertyFilter("inbound:foo=http://foo.com");
assertEquals("inbound", filter.getScope());
assertFalse(filter.accept(message));
Map inboundProps = new HashMap();
inboundProps.put("foo", "http://foo.com");
message = new DefaultMuleMessage("blah", inboundProps, null, null, muleContext);
assertTrue("Filter didn't accept the message", filter.accept(message));
//Checking here that a ':' in the value doesn't throw things off
filter = new MessagePropertyFilter("bar=http://bar.com");
//default scope
assertEquals("outbound", filter.getScope());
assertFalse(filter.accept(message));
message.setOutboundProperty("bar", "http://bar.com");
assertTrue("Filter didn't accept the message", filter.accept(message));
}