Make sure you set you expectations on the mocks first in your unit
test. Before any messages gets routed etc.
On Mon, Nov 5, 2012 at 9:27 PM, David Karlsen wrote:
> I'm confused about how expectedBodiesReceived behaves.
>
> I have a route where I mock a jms endpoint (the endpoint is sent to in
>
Doesn't this code look suspicious (look at actual bodies):
public void expectedBodiesReceived(final List bodies) {
expectedMessageCount(bodies.size());
this.expectedBodyValues = bodies;
this.actualBodyValues = new ArrayList();
expects(new Runnable() {
p
Same:
Body of message: 0. Expected: <:
> Try setting the expectation before you actually hit the endpoint with any
> messages. Hit the endpoint with your test logic. Then assert.
>
> Does it work then?
>
> Regards.
>
> Sent from a mobile device
> On 5 Nov 2012 20:27, "David Karlsen" wrote:
>
>> I
Try setting the expectation before you actually hit the endpoint with any
messages. Hit the endpoint with your test logic. Then assert.
Does it work then?
Regards.
Sent from a mobile device
On 5 Nov 2012 20:27, "David Karlsen" wrote:
> I'm confused about how expectedBodiesReceived behaves.
>
>
I'm confused about how expectedBodiesReceived behaves.
I have a route where I mock a jms endpoint (the endpoint is sent to in
an onException route as follows:
java.lang.Exception
true