« 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

Sorry, I need to clarify.

The service returns a KeySetup?
And you give the KeySetup a list to fill in?
Then you call getTerminators to return a List?

What's in KeySetup? Would you be better off just using a real object?

Why do you set the list and then retrieve it?

S.


On 11 Jun 2009, at 13:26, nino martinez wael wrote:

> Hi
>
> I might be headed down a wrong path.. But I have something like this:
>
> KeySetup keySetupCpr=mockery.mock(KeySetup.class);
>
> one(readOnlyAllInOneService).getKeySetup(KeySetupIdentification.class,
> "1010", "CustomCustomerIdent");
> will(returnValue(keySetupCpr));
> one(keySetupCpr).setTerminators(with(any(List.class)));
>
> Now my keysetup are being called with a list and the next thing that
> happens are a call to get keySetup.getTerminators , are there any way
> I can get the list that has just been set and return that?
>
> regards Nino
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

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?