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

Mock name should be a part of method verification error message #140

Closed
bl-nero opened this issue Nov 11, 2014 · 4 comments
Closed

Mock name should be a part of method verification error message #140

bl-nero opened this issue Nov 11, 2014 · 4 comments

Comments

@bl-nero
Copy link

bl-nero commented Nov 11, 2014

This would simplify debugging in case of multiple mocks of the same class verified through MockRepository.

@stakx
Copy link
Contributor

stakx commented Sep 23, 2017

I am not sure everyone would agree that this will make for better exception messages. (I'm personally not convinced that it would be very helpful, but I also wouldn't mind.) So I have an alternative suggestion:

Does the mock's name have to be in the exception .Message itself, or might it also suffice to add a new property to MockVerificationException, e.g. .MockName? That way, people interested in knowing which mock caused the exception can check that extra property.

@bl-nero
Copy link
Author

bl-nero commented Sep 25, 2017

Wow, I'm sorry, but I no longer have the context. I had to look at the project to even remind myself what's this. :) It's been years.

@stakx
Copy link
Contributor

stakx commented Sep 25, 2017

I know, I know. :) But I would feel bad about closing an old issue without any comment or at least attempting to follow up on it. If this is no longer important to you, we can also close this.

@bl-nero
Copy link
Author

bl-nero commented Sep 25, 2017

Yup, no longer important. Thanks! :)

@stakx stakx closed this as completed Sep 25, 2017
@devlooped devlooped locked and limited conversation to collaborators Sep 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants