2009/1/13 cmoulliard <cmoulli...@gmail.com>:
>
> Ok. I continue to use Junit4.
>
> Can a mockendpoint iterates through the exchanges because the following code
> does not display anything ?
>
>    @Test
>    public void testMarshallMessage() throws Exception {
>
>        resultEndpoint.expectedBodiesReceived(models);

You're missing the

resultEndpoint.assertIsSatisfied() call.

Adding an expectation doesn't cause an assertion failure



>
>        List<Exchange> exchanges = resultEndpoint.getExchanges();
>
>        for(Exchange exchange : exchanges) {
>                Object body = exchange.getIn().getBody();
>                System.out.println("Result : " + body);
>        }
>
>
>
> James.Strachan wrote:
>>
>> 2009/1/13 cmoulliard <cmoulli...@gmail.com>:
>>>
>>> Indeed, I use junit4.
>>>
>>> Do you prefer that I switch to Junit3 for the test ?
>>
>> Ultimately I think we should switch Camel to JUnit 4 so feel free to
>> go for it - I was really just mentioning that you can't copy/paste
>> test cases to JUnit4 and expect them to run without adding @Test
>>
>> --
>> James
>> -------
>> http://macstrac.blogspot.com/
>>
>> Open Source Integration
>> http://fusesource.com/
>>
>>
>
>
> -----
> Charles Moulliard
> SOA Architect
>
> My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/
> --
> View this message in context: 
> http://www.nabble.com/only-testMocksAreValid-is-executed-by-Camel-Spring-unit-test-%21%21-tp21436628s22882p21438228.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Reply via email to