June 2014
Intermediate to advanced
284 pages
6h 9m
English
Before going into details regarding Mockito and JUnit integration, it is worth mentioning a few words about JUnit.
JUnit is a testing framework (an implementation of the xUnit framework) that allows you to create repeatable tests in a very readable manner. In fact, JUnit is a port of Smalltalk's SUnit (both the frameworks were originally implemented by Kent Beck). What is important in terms of JUnit and Mockito integration is that under the hood, JUnit uses a test runner to run its tests (from xUnit—test runner is a program that executes the test logic and reports the test results).
Mockito has its own test runner implementation that allows you to reduce boilerplate in order to create test doubles (mocks and ...