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:50 UTC
[2/2] camel git commit: CAMEL-8785 Polished the test case
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");
}