servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r392328 - in /incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client: ServiceMixClientTest.java SimpleClientTest.java
Date Fri, 07 Apr 2006 16:10:03 GMT
Author: gnodet
Date: Fri Apr  7 09:10:01 2006
New Revision: 392328

URL: http://svn.apache.org/viewcvs?rev=392328&view=rev
Log:
Minor fixes to client tests

Modified:
    incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/ServiceMixClientTest.java
    incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/SimpleClientTest.java

Modified: incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/ServiceMixClientTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/ServiceMixClientTest.java?rev=392328&r1=392327&r2=392328&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/ServiceMixClientTest.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/ServiceMixClientTest.java
Fri Apr  7 09:10:01 2006
@@ -182,7 +182,7 @@
         context = createBeanFactory();
         //context.setXmlValidating(false);
 
-        client = (ServiceMixClient) getBean("client");
+        client = getClient();
 
         // TODO
         //receiver = (Receiver) getBean("receiver");
@@ -191,6 +191,10 @@
         receiver = (Receiver) jbi.getBean("receiver");
         assertNotNull("receiver not found in JBI container", receiver);
     }
+    
+    protected ServiceMixClient getClient() throws Exception {
+        return (ServiceMixClient) getBean("client");
+    }
 
     protected void tearDown() throws Exception {
         super.tearDown();
@@ -208,6 +212,5 @@
 
     protected AbstractXmlApplicationContext createBeanFactory() {
         return new ClassPathXmlApplicationContext("org/apache/servicemix/client/example.xml");
-
     }
 }

Modified: incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/SimpleClientTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/SimpleClientTest.java?rev=392328&r1=392327&r2=392328&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/SimpleClientTest.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/SimpleClientTest.java
Fri Apr  7 09:10:01 2006
@@ -21,7 +21,6 @@
 import org.apache.servicemix.jbi.container.ActivationSpec;
 import org.apache.servicemix.jbi.container.JBIContainer;
 
-import javax.jbi.messaging.ExchangeStatus;
 import javax.jbi.messaging.InOnly;
 import javax.jbi.messaging.MessageExchange;
 import javax.jbi.messaging.MessagingException;
@@ -48,7 +47,7 @@
         out = new OutBinding() {
             protected void process(MessageExchange exchange, NormalizedMessage message) throws
MessagingException {
                 System.out.println("Received: " + message);
-                exchange.setStatus(ExchangeStatus.DONE);
+                done(exchange);
             }
         };
         ActivationSpec as = new ActivationSpec("out",out);
@@ -73,6 +72,6 @@
         message.setContent(new StreamSource(new StringReader("<hello>world</hello>")));
         QName service = new QName("out");
         exchange.setService(service);
-        client.send(exchange);
+        client.sendSync(exchange);
     }
 }



Mime
View raw message