camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Reason why Mockendpoint generates an IndexOutOfBoundsException error ?
Date Thu, 15 Jan 2009 08:57:05 GMT
On Thu, Jan 15, 2009 at 9:38 AM, cmoulliard <cmoulliard@gmail.com> wrote:
>
> Hi,
>
> This should be interesting to add these(ose) remark(s) in the srping testing
> wiki page.
Dont you have wiki rights to edit :)


>
>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> Yeah as James writes the expects *must* be set before you do start
>> send exchanges into Camel.
>>
>> The send method is probably in a sync route so the exchange has
>> finished routing when you in the next codeline set the expected body.
>>
>>
>> On Wed, Jan 14, 2009 at 4:48 PM, James Strachan
>> <james.strachan@gmail.com> wrote:
>>> 2009/1/14 cmoulliard <cmoulliard@gmail.com>:
>>>>
>>>> The error is solved.
>>>>
>>>> Question :
>>>>
>>>> Why the template.sendBody(Object) must be placed in the code after the
>>>> MockEndpoint.expectedBodiesReceived() and not the inverse ?
>>>>
>>>> this code works :
>>>>
>>>>        resultEndpoint.expectedBodiesReceived(result);
>>>>        template.sendBody(generateModel());
>>>>
>>>> Not this one
>>>>
>>>>        template.sendBody(generateModel()
>>>>        resultEndpoint.expectedBodiesReceived(result);
>>>
>>> Up to now we've been assuming you setup the expectations before
>>> running your route. It could be MockEndpoint needs further patches to
>>> ensure it can cope with expectations being added after messages arrive
>>> on it
>>>
>>> --
>>> James
>>> -------
>>> http://macstrac.blogspot.com/
>>>
>>> Open Source Integration
>>> http://fusesource.com/
>>>
>>
>>
>>
>> --
>>
>> /Claus Ibsen
>> Apache Camel Committer
>> Blog: http://davsclaus.blogspot.com/
>>
>>
>
>
> -----
> Charles Moulliard
> SOA Architect
>
> My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/
> --
> View this message in context: http://www.nabble.com/Reason-why-Mockendpoint-generates-an-IndexOutOfBoundsException-error---tp21453025s22882p21473409.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 

/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/

Mime
View raw message