« Return to Thread: grabbing value from mutator on mockobject?

Re: grabbing value from mutator on mockobject?

by Steve Freeman-2 :: Rate this Message:

Reply to Author | View in Thread

On 11 Jun 2009, at 14:13, 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..
>
> For example here I expect this:
>
> one(keySetupCpr).setTerminators(with(any(List.class)));
>
> if I could grab that list things would be easier...


You can (using the with() clause). But I think your test is trying to  
tell about a problem with the current design. I'm not sure what it is,  
but all this passing around of lists doesn't sound right.

Either that, or the unit test is working with too large a unit.

S.

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


 « Return to Thread: grabbing value from mutator on mockobject?