On Mon, Jun 25, 2012 at 11:29 PM, dgallagher <
[hidden email]> wrote:
> Would it be recommend to use the following section in the url below
>
http://camel.apache.org/mock.html 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
http://camel.apache.org/advicewith.htmlAnd 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:
http://camel.465427.n5.nabble.com/Test-Case-Quartz-to-a-Custom-bean-tp5715085p5715086.html> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
FuseSource
Email:
[hidden email]
Web:
http://fusesource.comTwitter: davsclaus, fusenews
Blog:
http://davsclaus.comAuthor of Camel in Action:
http://www.manning.com/ibsen