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

Possible bug with captures() #30

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

Possible bug with captures() #30

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


Copy link

henri-tremblay commented Jun 3, 2015

Migrated from: CodeHaus issue EASYMOCK-19
Original reporter: Henri Tremblay

I think I may have run into a possible bug with using captures() to capture a parameter passed to a mocked method.

I've attached a (very simplified) test case to prove the behavior.

Please note that this is just a simplified test case - I know that I could specify the exact value of the arguments I expect passed to my mock, but in my real code the arguments are complex objects with a number of fields, and in the unit test (of the class using the mocked component), I want to capture the object so I can assert against just a few of those fields without re-creating the entire object in my test case.

Can someone please confirm if this is indeed a bug or if I am simply using this method wrong?

Matt Brown

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