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
Show stacktrace of undesirable call in verify
error message
#19
Comments
@gildor please check version 1.7.2 with applied changes and close ticket if everything is OK |
Here is exceptions from tests:
|
Thank you. Can confirm that now I can solve such cases without debugging, stack traces are very informative The only enhancement that I see to remove mockk internal calls from stacktrace.
Anyway, issue solved. I can log this stacktrace enhancement proposal to a separate issue. |
|
@oleksiyp Yeah sounds great. ByteBuddy subclass would be nice to cut too, it doesn't have line number information. Should I move this to a separate issue or keep this task open for now? |
Just keep it open. I'll release it with some other fixes and close |
@gildor check if version 1.7.3 fix your request. if everything ok please close the ticket. thank you |
@oleksiyp Yes, this works perfectly. And the even ByteBuddy call is looking nice now. |
Currently, if verify block throws an assert because you have undesired mock method call you cannot detect who called this method, so the only option to debug this case.
Currently I see something like:
java.lang.AssertionError: Verification failed: call 1 of 1: SomeClass(#10).someMethid()). 2 matching calls found, but needs at least 0 and at most 1 calls
But would be very good to have something like:
The text was updated successfully, but these errors were encountered: