-
Notifications
You must be signed in to change notification settings - Fork 583
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
ClassNotFoundException: org.mockito.exceptions.Reporter #734
Comments
I understand that most people want to use PowerMock with latest version of Mockito. But moving to Mockito 2 it's not just a change in dependency version and small changes in code. But it requires rewriting integration with Mockito, because PowerMock is heavily relying on the internal workings of Mockito (#726). You are welcome to help us with identify all places where internal Mockito API should be replaced with public API. |
Duplicates #684 |
Sorry - I don't understand your answer - I am not talking about powermock, but of powermock-api-mockito2 which already works with mockito 2 So this bug is definitively no duplicate of #684 P.S. in my case (100+ tests that use powermock and mockito) it works fine with powermock-api-mockito2 and mockito-core 2.0.42-beta - I just wish that you would reference a final version instead of that beta version... |
powermock-api-mockito2 was attempt to follow mockito2 changes during development. It's a copy from powermock-api-mockito with some changes to fit mockito 2. What's why it depends on beta version.
I was trying to follow, but I failed. Later, I had discussion with Mockito team. We came to conclusion that the best way to provide support of Mockito 2 is use only public Mockito SPI and they ready to help PowerMock team and make changes in SPI.
Best regrads,
Arthur Zagretdinov
On 27 Dec 2016, at 14:25, SebastianDietrich <notifications@github.com<mailto:notifications@github.com>> wrote:
Sorry - I don't understand your answer - I am not talking abou tpowermock, but of powermock-api-mockito2 which already works with mockito 2
-
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub<#734 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AMkKAPVo5q7I_R4mWafiZzuJNCpKPUTZks5rMPW8gaJpZM4LRyyv>.
|
Ok - thanks for clarifying. We will then stick to the current solution and wait for #726 |
powermock-api-mockito2 latest (1.6.6) refers to mockito-core 2.0.42-beta
Currently there is a mockito-core 2.3.7
Most people using mockito2 with powermock will not use an outdated beta version of mockito2. Using maven they will have a different version of mockito-core in their classpath. The API of mockito2 has changed since 2.0.42-beta - the class Reporter is no longer found in org.mockito.exceptions but in org.mockito.internal.exceptions.
--> please upgrade the dependency to the latest mockito-core 2 version
The text was updated successfully, but these errors were encountered: