View Javadoc

1   /*
2    * $Id: BindingInOnlyInOutOutOnlyTestCase.java 20321 2010-11-24 15:21:24Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.test.integration.messaging.meps;
12  
13  import org.mule.api.MuleMessage;
14  import org.mule.module.client.MuleClient;
15  import org.mule.tck.FunctionalTestCase;
16  
17  // START SNIPPET: full-class
18  public class BindingInOnlyInOutOutOnlyTestCase extends FunctionalTestCase
19  {
20      public static final long TIMEOUT = 3000;
21  
22      protected String getConfigResources()
23      {
24          return "org/mule/test/integration/messaging/meps/pattern_binding-In-Only_In-Out_Out-Only.xml";
25      }
26  
27      public void testExchange() throws Exception
28      {
29          MuleClient client = new MuleClient(muleContext);
30  
31  
32          client.dispatch("inboundEndpoint", new int[]{1,2,3,4,5}, null);
33  
34          MuleMessage result = client.request("receivedEndpoint", TIMEOUT);
35          assertNotNull(result);
36          assertEquals("Total: 15", result.getPayloadAsString());
37      }
38  }
39  // END SNIPPET: full-class