Package org.mule.routing.filters

Examples of org.mule.routing.filters.EqualsFilter


        }
    }

    public void testNoMatchingRouteWithDefaultRoute() throws Exception
    {
        choiceRouter.addRoute(new TestMessageProcessor("bar"), new EqualsFilter("zap"));
        choiceRouter.setDefaultRoute(new TestMessageProcessor("default"));
        assertEquals("foo:default", choiceRouter.process(getTestEvent("foo")).getMessageAsString());
    }
View Full Code Here


    @Test
    public void testNoMatchingNorDefaultRoute() throws Exception
    {
        try
        {
            choiceRouter.addRoute(new TestMessageProcessor("bar"), new EqualsFilter("zap"));
            choiceRouter.process(getTestEvent("foo"));
            fail("should have got a MuleException");
        }
        catch (MuleException me)
        {
View Full Code Here

    }

    @Test
    public void testNoMatchingRouteWithDefaultRoute() throws Exception
    {
        choiceRouter.addRoute(new TestMessageProcessor("bar"), new EqualsFilter("zap"));
        choiceRouter.setDefaultRoute(new TestMessageProcessor("default"));
        assertEquals("foo:default", choiceRouter.process(getTestEvent("foo")).getMessageAsString());
    }
View Full Code Here

    }

    @Test
    public void testMatchingRouteWithDefaultRoute() throws Exception
    {
        choiceRouter.addRoute(new TestMessageProcessor("bar"), new EqualsFilter("zap"));
        choiceRouter.setDefaultRoute(new TestMessageProcessor("default"));
        assertEquals("zap:bar", choiceRouter.process(getTestEvent("zap")).getMessageAsString());
    }
View Full Code Here

    }

    @Test
    public void testMatchingRouteWithStatistics() throws Exception
    {
        choiceRouter.addRoute(new TestMessageProcessor("bar"), new EqualsFilter("zap"));
        choiceRouter.setRouterStatistics(new RouterStatistics(RouterStatistics.TYPE_OUTBOUND));
        assertEquals("zap:bar", choiceRouter.process(getTestEvent("zap")).getMessageAsString());
    }
View Full Code Here

    public void testAddAndDeleteRoute() throws Exception
    {
        try
        {
            TestMessageProcessor mp = new TestMessageProcessor("bar");
            choiceRouter.addRoute(mp, new EqualsFilter("zap"));
            choiceRouter.removeRoute(mp);
            choiceRouter.setRouterStatistics(new RouterStatistics(RouterStatistics.TYPE_OUTBOUND));
            choiceRouter.process(getTestEvent("zap"));
            fail("should have got a MuleException");
        }
View Full Code Here

    @Test
    public void testUpdateRoute() throws Exception
    {
        TestMessageProcessor mp = new TestMessageProcessor("bar");
        choiceRouter.addRoute(mp, new EqualsFilter("paz"));
        choiceRouter.updateRoute(mp, new EqualsFilter("zap"));
        assertEquals("zap:bar", choiceRouter.process(getTestEvent("zap")).getMessageAsString());
    }
View Full Code Here

    }

    @Test
    public void testRemovingUpdatingMissingRoutes()
    {
        choiceRouter.updateRoute(new TestMessageProcessor("bar"), new EqualsFilter("zap"));
        choiceRouter.removeRoute(new TestMessageProcessor("rab"));
    }
View Full Code Here

{

    @Test
    public void testFilterPass() throws Exception
    {
        MessageFilter mp = new MessageFilter(new EqualsFilter(TEST_MESSAGE), false, null);
        SensingNullMessageProcessor listener = getSensingNullMessageProcessor();
        mp.setListener(listener);

        MuleEvent inEvent = getTestEvent(TEST_MESSAGE);
View Full Code Here

    }

    @Test
    public void testFilterFail() throws Exception
    {
        MessageFilter mp = new MessageFilter(new EqualsFilter(null), false, null);
        SensingNullMessageProcessor out = getSensingNullMessageProcessor();
        mp.setListener(out);

        MuleEvent inEvent = getTestEvent(TEST_MESSAGE);
View Full Code Here

TOP

Related Classes of org.mule.routing.filters.EqualsFilter

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.