I know, the problem are that the injection framework actually requires
the code to run on an webserver.. So as you say I need a mix of
things. And this is where Im at, defining what to mock and what not,
and further what is possible and what not. On top of that the
framework behind are not very good at using interfaces so that's just
another stone in my shoe:(
2009/6/12 Steve Freeman <
steve@...>:
> 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.uk>
> M3P 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>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email