camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Test Case - Quartz to a Custom bean
Date Tue, 26 Jun 2012 06:58:22 GMT
On Mon, Jun 25, 2012 at 11:29 PM, dgallagher <> wrote:
> Would it be recommend to use the following section in the url below
> and section
> Mocking endpoints and skip sending to original endpoint
> If i mock my custom bean and then call the mock and ignore the original
> would that be a sufficient use case?
> Obviously the bean would then be tested in isolation, similar to what would
> be done using other mocking frameworks

Yes this is a way to do this.
And from Camel 2.10 onwards its even easier, as you can do this from
the Camel Test Kit without using the advice with.

You may also consider if possible to plugin a different bean, then you
can just have a noop bean to plugin instead of the actual bean.

Or use advice with to modify the route before testing, and replace the
bean part with something else, like sending to a mock

And others may use property placeholders, then you can use a different
.properties file for unit testing, that instead of using a bean
endpoint, use a mock endpoint.

> Thanks
> Damien
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message