-
Notifications
You must be signed in to change notification settings - Fork 198
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
Verify Method called throws Null Pointer exception. #271
Comments
Your code probably calls |
When I run the test in debug mode, I get |
Have you tried
or
|
Yes I did, But getting same error |
Then try
There's a limitation in Mockito-kotlin verifying non-null parameters - it's mentioned in the wiki. |
Not Working :'( :'( |
Change |
Ok, Lemme give a try. |
What is the current status? Also, always include the full stack trace if there is one, and try to remove as much noise as possible from the code that has no relation to the issue. |
I tried all the suggestions that you have mentioned but couldn't solve the issue. ` org.mockito.exceptions.verification.TooManyActualInvocations:
` As I have already mentioned on previous conversation, after debugging the code, I came to know that verifying call of function |
I am running through the same problem again. Verify method called throws
FYI: I am using following versions of Gradle dependencies:
|
Your |
Method to Test from presenter
`
override
`
@VisibleForTesting
`
`
@test
The main issue here is whenever I try to run the test
syncLocalOrders_OrderNotEmptySuccessTest()
, the code enters to both subscribe and throwable offun syncLocalOrders(syncOrders: SyncOrders)
(this was got by keeping breakpoints.) And what I knew was the code enters to throwable after gettingNull Pointer Exception
ongetUnsuccessfulCallData(false, syncMessage)
and the test fails Saying something likeview.hideProgressDialog() wanted 1 time but was 2 times
. Can anybody tell me what am I doing wrong?The text was updated successfully, but these errors were encountered: