-
Notifications
You must be signed in to change notification settings - Fork 139
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 update/enhancements #384
Comments
* Upgrade test library versions. * Replace initMocks with JUnit rules. * Use strict stubs. * Replace "Mockito.`when`" with "whenever". * Fix a couple tests that were broken. Closes Hexworks#384.
* Upgrade test library versions. * Replace initMocks with JUnit rules. * Use strict stubs. * Replace "Mockito.`when`" with "whenever". * Fix a couple tests that were broken. Closes Hexworks#384.
As we are in a kotlin project I'd like to suggest to switch to MockK entirely. My experience with mockk so far is that is a charm to work with and much much better than mockito. |
|
… to original component. Closes Hexworks#374.
This is an admin task, but...Zircon's using Mockito 1.x (1.10.19), which was last updated in 2014. Mockito 3.x is available now. Mockito 2.x had a lot of enhancements, but the main thing of interest to me is strict stubs, which makes for higher-quality tests. We also don't seem to be leveraging the Mockito-kotlin module everywhere.
So:
initMocks(this)
whenever
instead of "Mockito.when
"Also, FWIW, Mockito is used very little in this codebase; just
UIEventToComponentDispatcherTest
andDefaultAnimationRunnerTest
, so this shouldn't be a big change.The text was updated successfully, but these errors were encountered: