Greetings,
Malte
> --
> You received this message because you are subscribed to the Google Groups "mockito" group.
> To post to this group, send email to moc...@googlegroups.com.
> To unsubscribe from this group, send email to mockito+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mockito?hl=en.
>
>
Well, that's a good idea, but I don't think it really helps here. I still want the object mocked, so I can verify its behavior, but I also want to get the arguments that were sent in each call to it, so I can temporarily print out the values.
It's almost like I want an interceptor/advice on the mock, where the interceptor does whatever it wants with the arguments, and would just print them out in my case.
Wouldn't Mockito.spy solve your problem ?
Igor
On Aug 4, 2010 9:36 PM, "KARR, DAVID (ATTSI)" <dk0...@att.com> wrote:> -----Original Message-----
Well, that's a good idea, but I don't think it really helps here. I still want the object mocked, so I can verify its behavior, but I also want to get the arguments that were sent in each call to it, so I can temporarily print out the values.
> From: moc...@googlegroups.com [mailto:moc...@googlegroups.com] On
>...
It's almost like I want an interceptor/advice on the mock, where the interceptor does whatever it wants with the arguments, and would just print them out in my case.
> On 4 August 2010 19:08, KARR, DAVID (ATTSI) <dk0...@att.com> wrote:
> > I'm testing a time-sensit...
--
You received this message because you are subscribed to the Google Groups "mockito" group.
To post t...
You can do so with a custom wrapper, I think.
Just implement your interface with methods that print the arguments
which then delegate internally to a mock object.
If you want to make it more clever, you could probably write a generic
dynamic proxy that does the same thing.
Greetings,
Malte