-
Notifications
You must be signed in to change notification settings - Fork 64
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
Using import org.amshove.kluent.mock leads to a java.lang.NoSuchMethodError in mockitokolin #168
Comments
What would we have to do on our end to resolve this? Is it enough to update the mockitokotlin version? |
I'm not sure what is causing this exception, it is definitely a bug in mockito that is happening this way but it still could be a wrong usage of the mockito library. |
Did you try to update mockitokotlin/mockito in Kluent and see what happens? |
Reproduced the same issue with latest version of mockito and mockito-kotlin + Kluent. Problem is the call |
…e and moved Mocking tests into the unit tests from the main Kluent code
Should be fixed with version 1.65. if not feel free to reopen :-) |
I updated mockitokotlin2 to 2.2.0 and after that we saw unit tests failing with
java.lang.NoSuchMethodError: com.nhaarman.mockitokotlin2.MockingKt.withSettings([Lkotlin/reflect/KClass;Ljava/lang/String;Ljava/lang/Object;Lorg/mockito/stubbing/Answer;ZLorg/mockito/mock/SerializableMode;Z[Lorg/mockito/listeners/InvocationListener;ZLcom/nhaarman/mockitokotlin2/UseConstructor;Ljava/lang/Object;)Lorg/mockito/MockSettings;
This only happened in cases where autocomplete mixed up the mock functions and we where using
org.amshove.kluent.mock
once we switched tocom.nhaarman.mockitokotlin2.mock
the tests go through again.There is also a ticket inside the mockitokotlin repository about this.
The text was updated successfully, but these errors were encountered: