View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.config.spring.parsers.specific;
8   
9   import org.mule.construct.SimpleFlowConstruct;
10  import org.mule.tck.junit4.FunctionalTestCase;
11  
12  import org.junit.Test;
13  
14  import static org.junit.Assert.assertEquals;
15  
16  public class MethodInvokerDefinitionParserTestCase extends FunctionalTestCase
17  {
18  
19      @Test
20      public void testPojoFlow() throws Exception
21      {
22          SimpleFlowConstruct flow = muleContext.getRegistry().lookupObject("pojoFlow");
23          SimpleFlowConstruct flow2 = muleContext.getRegistry().lookupObject("pojoFlow2");
24  
25          assertEquals("start nullmethod2Arg1Arg2config2Val arg2Valmethod2Arg1Arg2config2Val ", flow.process(
26              getTestEvent("start ")).getMessageAsString());
27  
28          assertEquals("start nullmethod2Arg1Arg2null arg2Valmethod2Arg1Arg2null ", flow2.process(
29              getTestEvent("start ")).getMessageAsString());
30      }
31  
32      @Override
33      protected String getConfigResources()
34      {
35          return "pojo-invoke-test.xml";
36      }
37  
38  }