You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sebh <se...@gmail.com> on 2014/01/01 15:11:21 UTC
Re: @MockEndpointsAndSkip appears to not mock all endpoints when
testing with Spring
Turns out that indeed all endpoints were mocked and skipped including the one
that is used as a producer, resulting in no message being sent around.
When using @MockEndpointsAndSkip(pattern) the producer should not be
included by the pattern.
--
View this message in context: http://camel.465427.n5.nabble.com/MockEndpointsAndSkip-appears-to-not-mock-all-endpoints-when-testing-with-Spring-tp5745105p5745395.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: @MockEndpointsAndSkip appears to not mock all endpoints when
testing with Spring
Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jan 1, 2014 at 3:11 PM, sebh <se...@gmail.com> wrote:
> Turns out that indeed all endpoints were mocked and skipped including the one
> that is used as a producer, resulting in no message being sent around.
>
> When using @MockEndpointsAndSkip(pattern) the producer should not be
> included by the pattern.
>
No it works as designed. You need to specify a pattern to mock only
the endpoints you actually need, or do a pattern that exclude the
endpoints you use to send messages from the unit test etc.
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/MockEndpointsAndSkip-appears-to-not-mock-all-endpoints-when-testing-with-Spring-tp5745105p5745395.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io