mockito icon indicating copy to clipboard operation
mockito copied to clipboard

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

Open alanrussian opened this issue 7 years ago • 1 comments

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.

alanrussian avatar Jun 22 '18 23:06 alanrussian

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

srawlins avatar Jun 22 '18 23:06 srawlins