Getting started | About | Tutorial | Samples | API | Source | Issues | Community | History |
---|
The available sample test suites can be found under the "samples" folder in the full distribution zip file.
Each test suite is in a separate Maven module, with its own pom.xml
file.
In total, there are about 500 sample tests, all using JUnit (except for a few that use TestNG) and most using the JMockit APIs; the ones that don't use JMockit are "pure" unit tests with no mocking at all, or tests using other mocking toolkits for comparison purposes.
The example tests used in the JMockit Tutorial introductory chapter are available online.
The following test suites are intended to compare published sample tests for other tools with the equivalent JMockit version:
EasyMock samples | ⇔ | JMockit version |
jMock samples | ⇔ | JMockit version |
PowerMock samples | ⇔ | JMockit version |
Mockito samples | ⇔ | JMockit version |
Unitils Mock samples | ⇔ | JMockit version |
There are two complete JUnit test suites for third-party frameworks. The frameworks, described in the Filthy Rich Clients book, were originally created without any developer tests at all (but great pieces of work nevertheless). These test suites aim to achieve 100% line and branch coverage of the library code:
Other sample suites:
LoginService
), based on the
Login Service Example article series.