Yes, you just need to replace the from endpoint uri with a property, then you switch the ftp endpoint with file endpoint easily.

Replacing the jms-component with a seda-component is not a good example, as jms has some unique operations which seda-component will not take, and it will cause some endpoint URI resolver exception.

Willem

Max Ullinger wrote:
Hi

Well, you could use property placeholders with different property files for 
test and runtime.
You could then define the endpoints externally in two files and use the ftp 
component for runtime and the file component for tests.

Cheers,
Max

-----Ursprüngliche Nachricht-----
Von: ankelee [mailto:[email protected]] Gesendet: Donnerstag, 10. Juni 2010 10:50
An: [email protected]
Betreff: Replace "from" endpoint with mock in test?


Hi

I'm setting up a test for a route that starts at an FTP-endpoint. I would
like to be able to test without setting up an FTP-server.

In Camel in Action there is shown a trick where you can replace the
jms-component with a seda-component and then consume from that endpoint. Is
there any tricks you could do similarly with the FTP-endpoint. I thought
about replacing it with a file endpoint but there's obviously unknown
parameters on there so that wouldn't work.

Is it possible to completely substitute a "from"-endpoint with another in
test/runtime?

Reply via email to