June 2014
Intermediate to advanced
284 pages
6h 9m
English
Adding Mockito to a project's classpath is as simple as adding one of the two jars to your project's classpath:
mockito-all: This is a single jar with all dependencies (with the hamcrest and objenesis libraries—as of June 2011).mockito-core: This is only Mockito core (without hamcrest or objenesis). Use this if you want to control which version of hamcrest or objenesis is used.If you are using a dependency manager that connects to the Maven Central Repository, then you can get your dependencies as follows (examples of how to add mockito-all to your classpath for Maven and Gradle):
For Maven, use the following code:
<dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> ...
Read now
Unlock full access