protected <T, U> void runFlowWithPayload(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()); }
protected <U> MuleEvent runFlowWithPayload(String flowName, U payload) throws Exception { Flow flow = lookupFlowConstruct(flowName); MuleEvent event = AbstractMuleTestCase.getTestEvent(payload); MuleEvent responseEvent = flow.process(event); return responseEvent; }
/** * Run the flow specified by name and assert equality on the expected output * * @param flowName The name of the flow to run * @param expect The expected output */ protected <T> void runFlowAndExpect(String flowName, T expect) throws Exception { Flow flow = lookupFlowConstruct(flowName); MuleEvent event = AbstractMuleTestCase.getTestEvent(null); MuleEvent responseEvent = flow.process(event); if (expect != null) { assertEquals(expect, responseEvent.getMessage().getPayload()); } }
public void testMuleMessageAsParameter() throws Exception { Flow flow = lookupFlowConstruct("acceptMuleMessage"); flow.process(AbstractMuleTestCase.getTestEvent("")); }
protected <T> void runFlow(String flowName) throws Exception { String payload = EMPTY_PAYLOAD; Flow flow = lookupFlowConstruct(flowName); MuleEvent event = AbstractMuleTestCase.getTestEvent(payload); MuleEvent responseEvent = flow.process(event); }