No, really. Take another look at your design, I think your test is
trying to tell you something.
This code is fine, but you should be cautious about using this much
behaviour in a mock. Having to hang on to an object so you can return
elsewhere in a test is a hint that maybe you should use a real object,
or that the object should be passed directly, or that there's a seam
that hasn't been exposed.
S
On 12 Jun 2009, at 08:02, nino martinez wael wrote:
> Thanks for the solution.:)
>
> 2009/6/11 Julian Hall <
jules@...>:
>> nino martinez wael wrote:
>>>
>>> The reason that I asked this question anyhow was because I wanted to
>>> use the real object but I cant grab it since Im not sure howto do
>>> that
>>> with jmock..
>>>
Steve Freeman
Winner of the Agile Alliance Gordon Pask award 2006
http://www.m3p.co.ukM3P Limited.
Registered office. 2 Church Street, Burnham, Bucks, SL1 7HZ.
Company registered in England & Wales. Number 03689627
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email