You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2015/05/21 05:29:49 UTC

[1/2] camel git commit: CAMEL-8785 Polished the test case

Repository: camel
Updated Branches:
  refs/heads/camel-2.14.x 587f43e3b -> 6c88ab9c7
  refs/heads/camel-2.15.x 8a9bc12df -> f4bd134bb


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/f4bd134b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f4bd134b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f4bd134b

Branch: refs/heads/camel-2.15.x
Commit: f4bd134bb553e1bcd102f6801fe038d20cdd6cdc
Parents: 8a9bc12
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu May 21 11:28:39 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu May 21 11:29:25 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/f4bd134b/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");
             }


[2/2] camel git commit: CAMEL-8785 Polished the test case

Posted by ni...@apache.org.
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/6c88ab9c
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6c88ab9c
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6c88ab9c

Branch: refs/heads/camel-2.14.x
Commit: 6c88ab9c7d9f42af0594f06e65782bb42ebb8f61
Parents: 587f43e
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu May 21 11:28:39 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu May 21 11:29:33 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/6c88ab9c/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");
             }