1
2
3
4
5
6
7
8
9
10
11 package org.mule.transport.tcp;
12
13 import org.mule.api.MuleMessage;
14 import org.mule.module.client.MuleClient;
15 import org.mule.tck.FunctionalTestCase;
16
17 public class TcpEchoDirectProtocolTestCase extends FunctionalTestCase
18 {
19
20 protected static String TEST_MESSAGE = "Test TCP Request";
21
22 protected String getConfigResources()
23 {
24 return "tcp-echo-test.xml";
25 }
26
27 public void testSend() throws Exception
28 {
29 MuleClient client = new MuleClient();
30 String url = "tcp://localhost:61200";
31
32 MuleMessage response = client.send(url, TEST_MESSAGE, null);
33 assertNotNull(response);
34 assertEquals(TEST_MESSAGE, response.getPayload());
35 }
36
37 }