Modified the test so that it better matches to the given use-case by the user-forum.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2654c816 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2654c816 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2654c816 Branch: refs/heads/camel-2.12.x Commit: 2654c816a1938452b921bef1b6d788aababa2c89 Parents: 003b37e Author: Babak Vahdat <bvah...@apache.org> Authored: Thu Oct 3 08:10:42 2013 +0200 Committer: Babak Vahdat <bvah...@apache.org> Committed: Sun Oct 13 20:49:33 2013 +0200 ---------------------------------------------------------------------- .../CamelSpringPropertyPlaceholderConfigurer3Test.java | 12 +++++++----- .../CamelSpringPropertyPlaceholderConfigurer3Test.xml | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/2654c816/components/camel-spring/src/test/java/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurer3Test.java ---------------------------------------------------------------------- diff --git a/components/camel-spring/src/test/java/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurer3Test.java b/components/camel-spring/src/test/java/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurer3Test.java index a9084dd..b22037d 100644 --- a/components/camel-spring/src/test/java/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurer3Test.java +++ b/components/camel-spring/src/test/java/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurer3Test.java @@ -50,13 +50,15 @@ public class CamelSpringPropertyPlaceholderConfigurer3Test extends SpringTestSup public Properties resolveProperties(CamelContext context, boolean ignoreMissingLocation, String... uri) throws Exception { Properties answer = super.resolveProperties(context, ignoreMissingLocation, uri); - // add the additional properties we need to provide so that the uri ""{{scheme}}{{separator}}{{authority}}"" - // inside the route can be resolved. please note that in this simple test we just add these properties - // hard-coded below but of course the mechanism to retrieve these extra properties can be anything else, - // e.g. through the entries inside a database table etc. + // define the additional properties we need to provide so that the uri "direct:{{foo}}" by the "from" clause + // as well as "{{scheme}}{{separator}}{{context-path}}" by the "to" clause can be properly resolved. please + // note that in this simple test we just add these properties hard-coded below but of course the mechanism to + // retrieve these extra properties can be anything else, e.g. through the entries inside a database table etc. + answer.put("foo", "bar"); + answer.put("scheme", "mock"); answer.put("separator", ":"); - answer.put("authority", "result"); + answer.put("context-path", "result"); return answer; } http://git-wip-us.apache.org/repos/asf/camel/blob/2654c816/components/camel-spring/src/test/resources/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurer3Test.xml ---------------------------------------------------------------------- diff --git a/components/camel-spring/src/test/resources/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurer3Test.xml b/components/camel-spring/src/test/resources/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurer3Test.xml index 680814a..b95b2d8 100644 --- a/components/camel-spring/src/test/resources/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurer3Test.xml +++ b/components/camel-spring/src/test/resources/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurer3Test.xml @@ -37,9 +37,9 @@ <camelContext xmlns="http://camel.apache.org/schema/spring"> <!-- in this route we use Camels property placeholder {{ }} style --> <route> - <from uri="direct:{{cool.bar}}"/> + <from uri="direct:{{foo}}"/> <bean ref="hello"/> - <to uri="{{scheme}}{{separator}}{{authority}}"/> + <to uri="{{scheme}}{{separator}}{{context-path}}"/> </route> </camelContext>