You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mark <el...@gmail.com> on 2017/05/16 15:23:27 UTC

how to unit test a Java Route which uses a property-placeholder

I have a class that extends RouteBuilder and loaded from a blueprint file
using the <package> tag.  In my blueprint file I also use
property-placeholder to set some values for the routes.  I would like to
unit test my class but I cannot figure out how to inject the properties.
Is there a way to do this that I'm not seeing?

Thank you.

Re: how to unit test a Java Route which uses a property-placeholder

Posted by Quinn Stevenson <qu...@pronoia-solutions.com>.
I use CamelBlueprintTestSupport and the setConfigAdminInitialConfiguration method.



> On May 16, 2017, at 9:23 AM, Mark <el...@gmail.com> wrote:
> 
> I have a class that extends RouteBuilder and loaded from a blueprint file
> using the <package> tag.  In my blueprint file I also use
> property-placeholder to set some values for the routes.  I would like to
> unit test my class but I cannot figure out how to inject the properties.
> Is there a way to do this that I'm not seeing?
> 
> Thank you.