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

Error messaging for verification with incorrect called value could be more helpful by listing calls #148

Open
alanrussian opened this issue Jun 22, 2018 · 1 comment
Labels
contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue)

Comments

@alanrussian
Copy link
Contributor

Here's a sample error message:

Expected: <3>...
Expected: <3>
  Actual: <2>
Unexpected number of calls
package:test                                                                                        expect
package:mockito/src/mock.dart 666:5                                                                 VerificationResult.called

This message would be a lot more useful if it listed the interactions with the subject being verified. In this case, it could list the two calls that were made.

@srawlins
Copy link
Member

Good idea. In the meantime, logInvocations is another way to debug.

@matanlurey matanlurey added the contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) label Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue)
Projects
None yet
Development

No branches or pull requests

3 participants