difference between mockito-core and mockito-all? What would I not be able to do if I use only mockito-core
for example?
mockito-core only contains mockito classes, while mockito-all contain mockito classes as well as some dependencies, one of them being hamcrest. “mockito-all” distribution has been discontinued in Mockito 2.
0 it looks like mockito community has come up with mockito-inline for some experimental features like mocking final classes and methods, mocking static methods etc. So once they get feedback from community they will merge those changes in mockito-core and abolished mockito-inline.
Current version is 4. Mockito 3 does not introduce any breaking API changes, but now requires Java 8 over Java 6 for Mockito 2.
Of course, mockito-core has some dependencies like hamcrest and objenesis that Maven downloads separately, but mockito-all is an out-dated dependency that bundles Mockito as well as its required dependencies. The latest GA version of mockito-all is a 1.
mockito-core
only contains mockito classes, while mockito-all
contain mockito classes as well as some dependencies, one of them being hamcrest.
In fact mockito-all
is discontinued according to the mockito website
“mockito-all” distribution has been discontinued in Mockito 2.*.
The two packages were/are equivalent but if you depend on mockito-core
you'll need to add a specific dependency on the packages transitively included in mockito-all
if you require them in your project.
I've personally experienced some issues when depending on a newer version some hamcrest
matchers while at the same time having a dependency on mockito-all
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With