Package org.mule.construct

Examples of org.mule.construct.Flow.process()


        Flow flow2 = muleContext.getRegistry().lookupObject("pojoFlow2");

        assertEquals("start nullmethod2Arg1Arg2config2Val arg2Valmethod2Arg1Arg2config2Val ", flow.process(
            getTestEvent("start ")).getMessageAsString());

        assertEquals("start nullmethod2Arg1Arg2null arg2Valmethod2Arg1Arg2null ", flow2.process(
            getTestEvent("start ")).getMessageAsString());
    }

    @Override
    protected String getConfigFile()
View Full Code Here


        props.put("bar", "mar");

        MuleMessage message = new DefaultMuleMessage(new FruitBowl(new Apple(), new Banana()), props,
            muleContext);

        MuleEvent resultEvent = flow.process(new DefaultMuleEvent(message, getTestInboundEndpoint(""),
            getTestService(), getTestSession(null, muleContext)));
        assertNotNull(resultEvent);
        assertNotNull(resultEvent.getMessage().getPayload());
        Object payload = resultEvent.getMessage().getPayload();
        assertFalse(payload.getClass().isArray());
View Full Code Here

    @Test
    public void testFlow() throws Exception
    {
      Flow flow = lookupFlowConstruct("configInMp");
        MuleEvent event = AbstractMuleTestCase.getTestEvent("");
        MuleEvent responseEvent = flow.process(event);
    }

    protected Flow lookupFlowConstruct(String name)
    {
        return (Flow) AbstractMuleTestCase.muleContext.getRegistry().lookupFlowConstruct(name);
View Full Code Here

    @Test
    public void testFlow() throws Exception
    {
      Flow flow = lookupFlowConstruct("normalConfig");
        MuleEvent event = AbstractMuleTestCase.getTestEvent("");
        MuleEvent responseEvent = flow.process(event);
    }

    protected Flow lookupFlowConstruct(String name)
    {
        return (Flow) AbstractMuleTestCase.muleContext.getRegistry().lookupFlowConstruct(name);
View Full Code Here

    */
    protected <T> void runFlowAndExpect(String flowName, T expect) throws Exception
    {
        Flow flow = lookupFlowConstruct(flowName);
        MuleEvent event = AbstractMuleTestCase.getTestEvent(null);
        MuleEvent responseEvent = flow.process(event);

        assertEquals(expect, responseEvent.getMessage().getPayload());
    }

    /**
 
View Full Code Here

    */
    protected <T, U> void runFlowWithPayloadAndExpect(String flowName, T expect, U payload) throws Exception
    {
        Flow flow = lookupFlowConstruct(flowName);
        MuleEvent event = AbstractMuleTestCase.getTestEvent(payload);
        MuleEvent responseEvent = flow.process(event);

        assertEquals(expect, responseEvent.getMessage().getPayload());
    }

    /**
 
View Full Code Here

    @Test
    public void testTransactional() throws Exception
    {
        Flow flow = (Flow) getFlowConstruct("transactional");
        MuleEvent event = getTestEvent("message", flow);
        flow.process(event);
        Integer countWithType1 = getCountWithType1();
        Integer countWithType2 = getCountWithType2();
        assertThat(countWithType1,Is.is(1));
        assertThat(countWithType2,Is.is(1));
    }
View Full Code Here

    {
        Flow flow = (Flow) getFlowConstruct("transactionalFailInTheMiddle");
        MuleEvent event = getTestEvent("message", flow);
        try
        {
            flow.process(event);
        } catch (Exception e)
        {
        }
        Integer countWithType1 = getCountWithType1();
        Integer countWithType2 = getCountWithType2();
View Full Code Here

    {
        Flow flow = (Flow) getFlowConstruct("transactionalFailAtEnd");
        MuleEvent event = getTestEvent("message", flow);
        try
        {
            flow.process(event);
        } catch (Exception e)
        {
        }
        Integer countWithType1 = getCountWithType1();
        Integer countWithType2 = getCountWithType2();
View Full Code Here

    {
        Flow flow = (Flow) getFlowConstruct("transactionalFailAfterEnd");
        MuleEvent event = getTestEvent("message", flow);
        try
        {
            flow.process(event);
        } catch (Exception e)
        {
        }
        Integer countWithType1 = getCountWithType1();
        Integer countWithType2 = getCountWithType2();
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.