Examples of parseFilterString()


Examples of org.mule.config.expression.ExpressionFilterParser.parseFilterString()

{
    @Test
    public void testSimpleFilters() throws Exception
    {
        ExpressionFilterParser parser = new ExpressionFilterParser();
        Filter f = parser.parseFilterString("#[regex:foo bar]");
        assertNotNull(f);
        assertTrue(f instanceof ExpressionFilter);

        MuleMessage message = new DefaultMuleMessage("foo bar baz", muleContext);
        assertTrue(f.accept(message));
View Full Code Here

Examples of org.mule.config.expression.ExpressionFilterParser.parseFilterString()

        MuleMessage message = new DefaultMuleMessage("foo bar baz", muleContext);
        assertTrue(f.accept(message));


        f = parser.parseFilterString("#[regex:.* bar] AND #[wildcard:foo*]");
        assertNotNull(f);
        assertTrue(f instanceof AndFilter);
        assertEquals(2, ((AndFilter)f).getFilters().size());
        assertTrue(((AndFilter)f).getFilters().get(0) instanceof ExpressionFilter);
        assertEquals("regex", ((ExpressionFilter)((AndFilter)f).getFilters().get(0)).getEvaluator());
View Full Code Here

Examples of org.mule.config.expression.ExpressionFilterParser.parseFilterString()

        assertTrue(f.accept(message));

        message = new DefaultMuleMessage("foo car", muleContext);
        assertFalse(f.accept(message));

        f = parser.parseFilterString("#[regex:.* bar] OR #[wildcard:foo*]");
        assertNotNull(f);

        message = new DefaultMuleMessage("foo bar", muleContext);
        assertTrue(f.accept(message));

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.