camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpalmer1026 <palmer1...@gmail.com>
Subject assertMockEndpointsSatisfied Question
Date Tue, 05 Apr 2011 15:52:54 GMT
Hi,

I'm trying to use the assertMockEndpointsSatisfied() method to assert that
all the expectations of the Mock endpoints are valid. In my test, I'm
passing in 2 messages to a topic and calling mock.expectedMessageCount(3)
and the test is passing (I can actually pass in any arbitrary number to
expectedMessageCount() method and the test will still pass). My code is as
follows:

@Test
    public void testQuote() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:quote");
        mock.expectedMessageCount(3);
        mock.expectedBodiesReceivedInAnyOrder("test 1", "test 2");

        template.sendBody("jms:topic:quote", "test 1");
        template.sendBody("jms:topic:quote", "test 2");

        assertMockEndpointsSatisfied();
    }

Does anyone have any ideas what might be causing this to fail?

--
View this message in context: http://camel.465427.n5.nabble.com/assertMockEndpointsSatisfied-Question-tp4284338p4284338.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message