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
Strange NoSuchMethodError when using 2.2.0 #364
Comments
NoSuchMethodError
when using 2.2.0
@BoD There's no |
Oh you're right, this is from Kluent actually... But still this only happens when updating the version of mockito-kotlin. Do you have an idea of what could be the issue, or should I try to open an issue on the Kluent project? 😊 |
I would check my imports. I don't know Kluent, but my guess is that |
So I checked and there is no Here's my imports:
and the modified version:
Any idea what could be wrong? |
Oh I have more info: I also upgraded |
Makes sense, as Mockito-kotlin internally relies on Mockito. There's probably a breaking change in Mockito. |
All right thank you. I just looked and I notice Mockito-kotlin depends on a fairly old version of Thanks! |
So if I understand correctly mockito-kotlin |
That's correct. |
@BoD Could you post a bit more of the test code? Can't reproduce the issue with upgraded mockito-core dependency. |
I had the same issue and we also use Kluent. In this Test it turned out we used the mock method from Kluent instead of mockitotokotlin and with that we got:
After changing from |
Sorry to reply so late. I can confirm that we do use the If a new version of mockito-kotlin with an up-to-date version of the dependency to mockito could be released, I can easily see if that resolves the issue. Plus I guess it's generally a good idea to be up to date ;) |
It's been several years :) Would it be possible to try to make mockito-kotlin depend on a recent version of mockito? Currently it depends on |
See #408 as well for updated dependencies. |
I've been trying to upgrade from
2.1.0
to2.2.0
and now I have a few tests that fail with this exception:This is on a test that does something like this:
Any idea?
The text was updated successfully, but these errors were encountered: