You mean by using the properties component [1]?
It may not be immediately obvious from the examples there, but you can have
something like
<route>
<from uri="direct:start"/>
<to uri="{{destination}}"/>
</route>
And the 'destination' would be defined in a properties file specific to your
environment. So you'd only have to modify the url in a properties file, no
recompile or anything. That works with the all the dsls (java, spring).
Does this help?
Hadrian
[1] http://camel.apache.org/properties.html
On Apr 8, 2011, at 5:18 PM, jpalmer1026 wrote:
> I'm trying to test a route that moves a message from the file system to an
> ftp server. I have a simple route defined as follows:
>
>
>
>
>
>
> I'd like to unit test the transfer by using a mock component for the ftp
> component. The Camel in Action book has some great examples on using mock
> components but they all create the routes containing the mock components
> directly in the test classes. I'm wondering how I can write a unit test
> testing my main spring DSL code but instead of specifying the ftp component
> in my route, use the mock component instead.
>
> Can this be done?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Question-about-using-mocks-tp4291965p4291965.html
> Sent from the Camel - Users mailing list archive at Nabble.com.