Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Multiple Captures #77

henri-tremblay opened this issue Jun 3, 2015 · 0 comments

Enable Multiple Captures #77

henri-tremblay opened this issue Jun 3, 2015 · 0 comments


Copy link

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
I tried to override Capture and include a Collection accumulating the values see 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?

thanks, Mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant