Migrated from: CodeHaus issue EASYMOCK-66 Original reporter: Henri Tremblay
I have a method where the mocked method is called multiple times. If I use a Capture for this then the value is the one from the last call (as would be expected). If I use multiple Captures then all of them have the value from the last call - this I would not expect, see attached TestCase CaptureTest.java.
I tried to override Capture and include a Collection accumulating the values see CaptureStackTest.java. The collection then contains duplicate values indicating that the method Capture.setValue() is called once for the first call, twice for the second call etc.
I suppose this is part of how EasyMock identifies the matchers? Would it be possible to have the setValue be called only as appropriate?
The text was updated successfully, but these errors were encountered: