You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by js...@apache.org on 2006/06/30 20:04:49 UTC
svn commit: r418348 -
/incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/ClientDestinationTest.java
Author: jstrachan
Date: Fri Jun 30 11:04:48 2006
New Revision: 418348
URL: http://svn.apache.org/viewvc?rev=418348&view=rev
Log:
added another test case and removed some cruft
Modified:
incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/ClientDestinationTest.java
Modified: incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/ClientDestinationTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/ClientDestinationTest.java?rev=418348&r1=418347&r2=418348&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/ClientDestinationTest.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/ClientDestinationTest.java Fri Jun 30 11:04:48 2006
@@ -92,42 +92,21 @@
}
- /*
- public void testSendUsingMessage() throws Exception {
- Message message = inOnlyDestination.createMessage();
- message.setProperty("name", "James");
- message.setContent(new StreamSource(new StringReader("<hello>world</hello>")));
-
- inOnlyDestination.send(message);
-
- messageList.assertMessagesReceived(1);
- }
-
- public void testSendUsingMessageUsingPOJOWithXStreamMarshaling() throws Exception {
+ public void testInOnlyMessageUsingPOJOWithXStreamMarshaling() throws Exception {
TestBean bean = new TestBean();
bean.setName("James");
bean.setLength(12);
bean.getAddresses().addAll(Arrays.asList(new String[] { "London", "LA" }));
- Message message = inOnlyDestination.createMessage(bean);
+ Destination destination = client.createDestination("service:http://servicemix.org/cheese/receiver");
+ Message message = destination.createInOnlyMessage();
message.setProperty("name", "James");
+ message.setBody(bean);
- inOnlyDestination.send(message);
+ client.send(message);
messageList.assertMessagesReceived(1);
}
-
- public void testRequestResponse() throws Exception {
- InOut exchange = inOutDestination.createInOutExchange();
- Message request = inOutDestination.createMessage();
- exchange.setInMessage(request);
- Message response = inOutDestination.invoke(exchange);
-
- assertNotNull("Should have returned a non-null response!", response);
-
- log.info("Received result: " + response);
- }
- */
protected void setUp() throws Exception {
context = createBeanFactory();