-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Mockito cannot mock this class: FirebaseRemoteConfig #1138
Comments
The error is inthe stack trace. Its due to inconsistent stack frames what is typically a result of obfuscation. |
Thanks @raphw. In the other issue you say you filed a bug report at Proguard. Can you give me the link to that so I can follow the progress? |
I assume that the Firebase library for Android is obfuscated with the option @andersu, do you use |
@TimvdLippe Are there any plans to make verifying (using eq(), any()) in kotlin possible? I mean I have no problem with mockito-kotlin but shouldn't it be the long term plan to support kotlin as well without the need for another library? |
@Writtscher Please open a new issue to discuss that issue. Then we can flesh out plans to see what we can do to improve Kotlin support. For now, there is an available solution/workaround, so have to see what the costs and benefits are. |
I have the same problem when trying to mock DatabaseReference for the Firebase Realtime Database, when trying to mock it with https://github.com/firebase/firebase-android-sdk/tree/master/firebase-database the suggested |
What Mockito version are you using. Are you getting verification errors? Those should be solved with the latest releases. |
Closing per above comment. |
I'm using mockito 2.8.9 with mock-maker-inline and run into the following problem.
Looks to be closely related to #1078
I tried the -noverify JVM argument suggested on that issue, but then it seems like Mockito's verify method does not work.
verify(addressService).saveSelectedAddress(any(Address::class.java))
Stacktrace without -noverify:
Result with -noverify:
When I debug the test I can see that saveSelectedAddress is called with a non-null object, but the test still fails.
The text was updated successfully, but these errors were encountered: