camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1461017 - in /camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala: converter/ScalaTypeConverterTest.scala dsl/RichTestUri.scala
Date Tue, 26 Mar 2013 08:44:16 GMT
Author: ningjiang
Date: Tue Mar 26 08:44:16 2013
New Revision: 1461017

URL: http://svn.apache.org/r1461017
Log:
CAMEL-6208 supported the asyncSend method in RichTestUri

Removed:
    camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/converter/ScalaTypeConverterTest.scala
Modified:
    camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/RichTestUri.scala

Modified: camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/RichTestUri.scala
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/RichTestUri.scala?rev=1461017&r1=1461016&r2=1461017&view=diff
==============================================================================
--- camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/RichTestUri.scala
(original)
+++ camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/RichTestUri.scala
Tue Mar 26 08:44:16 2013
@@ -35,10 +35,20 @@ class RichTestUri(uri: String, support: 
   def !?(message: Any) = {
     message match {
       case fn : (Exchange => Unit) => support.getTemplate.request(uri, new ScalaProcessor(fn))
+      case processor: Processor => support.getTemplate.request(uri, processor)
       case body : Object => support.getTemplate.requestBody(uri, body)
     }
   }
 
+  def !!(message: Any) = {
+    message match {
+      case fn : (Exchange => Unit) => support.getTemplate.asyncSend(uri, new ScalaProcessor(fn))
+      case exchange : Exchange => support.getTemplate.asyncSend(uri, exchange)
+      case processor : Processor => support.getTemplate.asyncSend(uri, processor)
+      case body : Object => support.getTemplate.asyncRequestBody(uri, body)
+    }
+  }
+
   def expect(block: MockEndpoint => Unit) {
     val mock = support.mock(uri)
     block(mock)



Mime
View raw message