View Javadoc

1   /*
2    * $Id: ComponentBindingTestCase.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.transport.jms;
12  
13  import org.mule.api.MuleException;
14  import org.mule.api.MuleMessage;
15  import org.mule.module.client.MuleClient;
16  import org.mule.tck.FunctionalTestCase;
17  
18  public class ComponentBindingTestCase extends FunctionalTestCase
19  {
20      protected String getConfigResources()
21      {
22          return "org/mule/test/integration/providers/jms/nestedrouter-test.xml";
23      }
24  
25      public void testBinding() throws MuleException
26      {
27          MuleClient client = new MuleClient(muleContext);
28          String message = "Mule";
29          client.dispatch("jms://invoker.in", message, null);
30          MuleMessage reply = client.request("jms://invoker.out", 10000);
31          assertNotNull(reply);
32          assertEquals("Received: Hello " + message + " " + 0xC0DE, reply.getPayload());
33      }
34  }