camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Minh Tran <darth.minhs...@gmail.com>
Subject MockEndPoint expected methods clashing
Date Fri, 04 Jul 2014 02:00:19 GMT
Hi

I’m calling setExpectedMessageCount and expectedBodiesReceived like this and seeing odd
behaviour

endpoint.setExpectedMessageCount(2);
endpoint.setExpectedBodies(“hello”);

I would expect that it will attempt to find 2 messages with both bodies containing “hello”.
Instead it appears as though the second call overwrites the expected message count back to
1. Is this expected behaviour?

If so, how do I achieve what I want so that it finds the number of messages I need without
me having to specify the body over and over?
Mime
View raw message