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 2016/01/03 16:44:40 UTC
camel git commit: CAMEL-9450: Fixed test
Repository: camel
Updated Branches:
refs/heads/master effc3f294 -> 89e951a1a
CAMEL-9450: Fixed test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/89e951a1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/89e951a1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/89e951a1
Branch: refs/heads/master
Commit: 89e951a1a5b96785c01832ebd471784852d1499c
Parents: effc3f2
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Jan 3 16:44:12 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Jan 3 16:44:12 2016 +0100
----------------------------------------------------------------------
.../camel/component/rest/FromRestConfigurationTest.java | 8 ++++----
.../camel/component/rest/SpringFromRestConfigurationTest.xml | 3 +++
2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/89e951a1/camel-core/src/test/java/org/apache/camel/component/rest/FromRestConfigurationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestConfigurationTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestConfigurationTest.java
index 4930f16..2262081 100644
--- a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestConfigurationTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestConfigurationTest.java
@@ -22,12 +22,10 @@ import org.apache.camel.impl.JndiRegistry;
public class FromRestConfigurationTest extends FromRestGetTest {
- private Object myDummy = new FooBar();
-
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
- jndi.bind("myDummy", myDummy);
+ jndi.bind("myDummy", new FooBar());
return jndi;
}
@@ -45,7 +43,9 @@ public class FromRestConfigurationTest extends FromRestGetTest {
assertEquals("#myDummy", context.getRestConfiguration().getConsumerProperties().get("dummy"));
DummyRestConsumerFactory factory = (DummyRestConsumerFactory) context.getRegistry().lookupByName("dummy-rest");
- assertSame(myDummy, factory.getDummy());
+
+ Object dummy = context.getRegistry().lookupByName("myDummy");
+ assertSame(dummy, factory.getDummy());
}
@Override
http://git-wip-us.apache.org/repos/asf/camel/blob/89e951a1/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
index d6677d0..10711f1 100644
--- a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
+++ b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
@@ -25,6 +25,8 @@
<!-- use a dummy rest consumer factory for the rest engine -->
<bean id="dummy-rest" class="org.apache.camel.component.rest.DummyRestConsumerFactory"/>
+ <bean id="myDummy" class="org.apache.camel.impl.FooBar"/>
+
<camelContext xmlns="http://camel.apache.org/schema/spring">
<restConfiguration component="dummy-rest" host="localhost" port="9090">
@@ -32,6 +34,7 @@
<componentProperty key="other" value="stuff"/>
<endpointProperty key="size" value="200"/>
<consumerProperty key="pollTimeout" value="1000"/>
+ <consumerProperty key="dummy" value="#myDummy"/>
</restConfiguration>
<rest path="/say/hello">