Hi,

This is possible as of Camel 2.7, see http://camel.apache.org/mock.html and
in particular the section called "Mocking existing endpoints with XML DSL".

You may also want to take a look at MockFtpServer (
http://mockftpserver.sourceforge.net/). It's great for writing integration
tests.

Regards,
Richard

On Fri, Apr 8, 2011 at 11:18 PM, jpalmer1026 <palmer1...@gmail.com> 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.
>

Reply via email to