Package org.mule.tck.functional

Examples of org.mule.tck.functional.AssertionMessageProcessor


    }

    @Test
    public void startAssertionMessageProcessor() throws Exception
    {
        AssertionMessageProcessor asp = new AssertionMessageProcessor();
        asp.setFlowConstruct(flowConstruct);
        asp.start();
    }
View Full Code Here


    }

    @Test
    public void processDummyEvent() throws Exception
    {
        AssertionMessageProcessor asp = new AssertionMessageProcessor();
        asp.setFlowConstruct(flowConstruct);
        asp.start();
        asp.process(mock(MuleEvent.class));
    }
View Full Code Here

    }

    @Test
    public void processValidEvent() throws Exception
    {
        AssertionMessageProcessor asp = new AssertionMessageProcessor();
        asp.setFlowConstruct(flowConstruct);
        asp.setExpression(TRUE_EXPRESSION);
        asp.start();
        asp.process(mock(MuleEvent.class));
        assertFalse(asp.expressionFailed());
        assertFalse(asp.countFailOrNullEvent());
    }
View Full Code Here

    }

    @Test
    public void processInvalidEvent() throws Exception
    {
        AssertionMessageProcessor asp = new AssertionMessageProcessor();
        asp.setFlowConstruct(flowConstruct);
        asp.setExpression(FALSE_EXPRESSION);
        asp.start();
        asp.process(mock(MuleEvent.class));
        assertTrue(asp.expressionFailed());
        assertFalse(asp.countFailOrNullEvent());
    }
View Full Code Here

    }

    @Test
    public void processZeroEvents() throws Exception
    {
        AssertionMessageProcessor asp = new AssertionMessageProcessor();
        asp.setFlowConstruct(flowConstruct);
        asp.setExpression(TRUE_EXPRESSION);
        asp.start();
        assertFalse(asp.expressionFailed());
        assertTrue(asp.countFailOrNullEvent());
    }
View Full Code Here

    }

    @Test
    public void processSomeValidEvents() throws Exception
    {
        AssertionMessageProcessor asp = new AssertionMessageProcessor();
        asp.setFlowConstruct(flowConstruct);
        asp.setExpression(TRUE_EXPRESSION);
        asp.start();
        asp.process(mock(MuleEvent.class));
        asp.process(mock(MuleEvent.class));
        asp.process(mock(MuleEvent.class));
        assertFalse(asp.expressionFailed());
        assertFalse(asp.countFailOrNullEvent());
    }
View Full Code Here

    }

    @Test
    public void processSomeInvalidEvent() throws Exception
    {
        AssertionMessageProcessor asp = new AssertionMessageProcessor();
        asp.setFlowConstruct(flowConstruct);
        asp.setExpression(TRUE_EXPRESSION);
        asp.start();
        asp.process(mock(MuleEvent.class));
        asp.process(mock(MuleEvent.class));
        asp.setExpression(FALSE_EXPRESSION);
        asp.process(mock(MuleEvent.class));
        asp.setExpression(TRUE_EXPRESSION);
        asp.process(mock(MuleEvent.class));
        assertTrue(asp.expressionFailed());
        assertFalse(asp.countFailOrNullEvent());
    }
View Full Code Here

    }

    @Test
    public void processMoreThanCountEvents() throws Exception
    {
        AssertionMessageProcessor asp = new AssertionMessageProcessor();
        asp.setFlowConstruct(flowConstruct);
        asp.setExpression(TRUE_EXPRESSION);
        asp.setCount(5);
        asp.start();
        for(int i = 0; i < 6; i++)
        {
            asp.process(mock(MuleEvent.class));
        }
        assertFalse(asp.expressionFailed());
        assertTrue(asp.countFailOrNullEvent());
    }
View Full Code Here

    }

    @Test
    public void processLessThanCountEvents() throws Exception
    {
        AssertionMessageProcessor asp = new AssertionMessageProcessor();
        asp.setFlowConstruct(flowConstruct);
        asp.setExpression(TRUE_EXPRESSION);
        asp.setCount(5);
        asp.start();
        for(int i = 0; i < 4; i++)
        {
            asp.process(mock(MuleEvent.class));
        }
        assertFalse(asp.expressionFailed());
        assertTrue(asp.countFailOrNullEvent());
    }
View Full Code Here

    }

    @Test
    public void processExactCountEvents() throws Exception
    {
        AssertionMessageProcessor asp = new AssertionMessageProcessor();
        asp.setFlowConstruct(flowConstruct);
        asp.setExpression(TRUE_EXPRESSION);
        asp.setCount(5);
        asp.start();
        for(int i = 0; i < 5; i++)
        {
            asp.process(mock(MuleEvent.class));
        }
        assertFalse(asp.expressionFailed());
        assertFalse(asp.countFailOrNullEvent());
    }
View Full Code Here

TOP

Related Classes of org.mule.tck.functional.AssertionMessageProcessor

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.