On Thu, Jan 15, 2009 at 9:38 AM, cmoulliard <cmoulli...@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.strac...@gmail.com> wrote: >>> 2009/1/14 cmoulliard <cmoulli...@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/