camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject camel git commit: CAMEL-8785 Polished the test case
Date Thu, 21 May 2015 03:28:53 GMT
Repository: camel
Updated Branches:
  refs/heads/master 8c3bcf475 -> adc16c38c


CAMEL-8785 Polished the test case


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/adc16c38
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/adc16c38
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/adc16c38

Branch: refs/heads/master
Commit: adc16c38c9ea752fd55dbaf9a2c5232018d5a03f
Parents: 8c3bcf4
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Thu May 21 11:28:39 2015 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Thu May 21 11:28:39 2015 +0800

----------------------------------------------------------------------
 .../apache/camel/itest/issues/IntercepFromAndStrategyTest.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/adc16c38/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/IntercepFromAndStrategyTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/IntercepFromAndStrategyTest.java
b/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/IntercepFromAndStrategyTest.java
index d93de76..ed9c50a 100644
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/IntercepFromAndStrategyTest.java
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/IntercepFromAndStrategyTest.java
@@ -29,6 +29,9 @@ public class IntercepFromAndStrategyTest extends CamelTestSupport {
 
     @EndpointInject(uri = "mock:result")
     protected MockEndpoint resultEndpoint;
+    
+    @EndpointInject(uri = "mock:intercepted")
+    protected MockEndpoint interceptedEndpoint;
 
     @Produce(uri = "direct:start")
     protected ProducerTemplate template;
@@ -36,6 +39,7 @@ public class IntercepFromAndStrategyTest extends CamelTestSupport {
     @Test
     public void strategyTest() throws Exception {
         resultEndpoint.expectedBodiesReceived("Bla Bla Bla");
+        interceptedEndpoint.expectedBodiesReceived("Bla Bla Bla");
         template.sendBody("direct:start", "Bla Bla Bla");
         assertMockEndpointsSatisfied();
     }
@@ -50,7 +54,7 @@ public class IntercepFromAndStrategyTest extends CamelTestSupport {
                 // removing this line the test works
                 context.addInterceptStrategy(new DummyInterceptor());
                 // intercet from
-                interceptFrom("direct:start").log("Intercepted");
+                interceptFrom("direct:start").log("Intercepted").to("mock:intercepted");
 
                 from("direct:start").to("mock:result");
             }


Mime
View raw message