You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/03/07 08:56:56 UTC

[2/3] camel git commit: Fixed test

Fixed test


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

Branch: refs/heads/master
Commit: e244c33e3dbcc7efcf0b3b6bc3d30ba362434cb3
Parents: d65802f
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Mar 7 09:31:44 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Mar 7 09:31:44 2017 +0100

----------------------------------------------------------------------
 .../camel/component/rest/FromRestDefaultValueTest.java | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e244c33e/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDefaultValueTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDefaultValueTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDefaultValueTest.java
index 14ce5e5..47cd6c1 100644
--- a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDefaultValueTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDefaultValueTest.java
@@ -31,15 +31,22 @@ public class FromRestDefaultValueTest extends ContextTestSupport {
     }
 
     public void testDefaultValue() throws Exception {
-        // the rest becomes routes and the input is a seda endpoint created by the DummyRestConsumerFactory
+        getMockEndpoint("mock:bye").expectedBodiesReceived("Hello World");
         getMockEndpoint("mock:bye").expectedHeaderReceived("kind", "customer");
+
+        // the rest becomes routes and the input is a seda endpoint created by the DummyRestConsumerFactory
         template.sendBody("seda:get-say-bye", "Hello World");
-        assertMockEndpointsSatisfied();
 
-        resetMocks();
+        assertMockEndpointsSatisfied();
+    }
 
+    public void testDefaultValueOverride() throws Exception {
+        getMockEndpoint("mock:bye").expectedBodiesReceived("Bye World");
         getMockEndpoint("mock:bye").expectedHeaderReceived("kind", "admin");
+
+        // the rest becomes routes and the input is a seda endpoint created by the DummyRestConsumerFactory
         template.sendBodyAndHeader("seda:get-say-bye", "Bye World", "kind", "admin");
+
         assertMockEndpointsSatisfied();
     }