CAMEL-8382: Route inputs should also resolve property placeholder during route prepare so its similar to the rest of the route.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5ea7ced8 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5ea7ced8 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5ea7ced8 Branch: refs/heads/master Commit: 5ea7ced8aba8aa778131c1e7777dd67d83077beb Parents: 44561c9 Author: Claus Ibsen <davscl...@apache.org> Authored: Sat Feb 21 11:58:47 2015 +0100 Committer: Claus Ibsen <davscl...@apache.org> Committed: Sat Feb 21 11:58:47 2015 +0100 ---------------------------------------------------------------------- .../properties/PropertiesComponentEndpointTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/5ea7ced8/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentEndpointTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentEndpointTest.java b/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentEndpointTest.java index 557008f..f32b5c4 100644 --- a/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentEndpointTest.java +++ b/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentEndpointTest.java @@ -20,6 +20,7 @@ import org.apache.camel.CamelContext; import org.apache.camel.ContextTestSupport; import org.apache.camel.FailedToCreateRouteException; import org.apache.camel.ResolveEndpointFailedException; +import org.apache.camel.RuntimeCamelException; import org.apache.camel.builder.RouteBuilder; /** @@ -79,11 +80,10 @@ public class PropertiesComponentEndpointTest extends ContextTestSupport { }); context.start(); fail("Should throw exception"); - } catch (FailedToCreateRouteException e) { - ResolveEndpointFailedException cause = assertIsInstanceOf(ResolveEndpointFailedException.class, e.getCause()); - IllegalArgumentException iae = assertIsInstanceOf(IllegalArgumentException.class, cause.getCause()); + } catch (RuntimeCamelException e) { + IllegalArgumentException cause = assertIsInstanceOf(IllegalArgumentException.class, e.getCause()); String msg = "PropertiesComponent with name properties must be defined in CamelContext to support property placeholders."; - assertTrue(iae.getMessage().startsWith(msg)); + assertTrue(cause.getMessage().startsWith(msg)); } }