Exemplo n.º 1
0
  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());
  }
Exemplo n.º 2
0
  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());
    }
  }
Exemplo n.º 4
0
 public void testMuleMessageAsParameter() throws Exception {
   Flow flow = lookupFlowConstruct("acceptMuleMessage");
   flow.process(AbstractMuleTestCase.getTestEvent(""));
 }
Exemplo n.º 5
0
 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);
 }