Actually interceptSendToEndpoint applies over route collections, but not on a
On 10/15/2016 03:36 PM, Tomohisa Igarashi wrote:
I'm not sure if it's a bug or misuse, but expectedBodyReceived().body().isEqualTo("expected")
doesn't work as expected. expectedBodiesReceived("expected") or
expectedBodyReceived().constant("expected") works fine.
only testBodyIsEqualTo() fails.
No idea yet for your second issue, but it sounds like the all endpoints are
intercepted regardless of the RouteDefinition you invoked adviceWith().
On 10/15/2016 02:06 AM, catequil wrote:
Ok, so it appears that I understand and have a working copy. There are
however a few remaining questions. If you feel they are no longer relevant
in this thread let me know and I will create a new thread.
In the code below I expected it to grab the "myRouteMiddle" route and find
the endpoint(direct:end) intercept it and mock the direct:end as
In the assertions I expected it to to have a body of "peace world!", but the
test passed with a body of "hello world!".
Am I misunderstanding how the intercepts and/or getRouteDefinition work?
On a second issue I intercepted "log:input" and the test failed saying there
were 3 messages. I expected it to only have one based on the following
1. the "skipSendToOriginalEndpoint" should have stopped the last "log:input"
from being activated.
2. the getRouteDefinition was set to get "myMiddleRoute" which in my mind
should have gotten just the middle route and not the start route making the
total messages just 1.
Do you know why this works this way? Is this a bug? Or am I miss
understanding how it works?
View this message in context:
Sent from the Camel - Users mailing list archive at Nabble.com.