How to use Mockito

Mockito is a simple Java framework for creating and manipulating mock objects. Here is a Mockito tutorial. The easiest way to install it is by adding
<dependency>
    <groupId>org.mockito</groupId>
    <artifactId>mockito-core</artifactId>
    <version>2.15.0</version>
</dependency>
to the pom.xml file of your Maven project. However, if you had problems with Maven, then you can also download this zip file, which contains all the necessary libraries for Mockito. Unpack the zip-file in the lib directory of your Eclipse project (if you have the latest library01.zip file, then the lib directory already exists; otherwise, just create it). Then add all the jar files to your class path, by going to your project properies, build path, libraries and press "add jars". Make sure that jar files are in the current project, because otherwise, the jar files won't be contained in the Eclipse project when you give it to somebody else. This will lead to broken libraries.


Part of Assignment Week 3
Hubert Baumeister
April 23, 2018