Skip navigation links
JMockit Home

Package mockit.integration.junit4

Provides integration with JUnit 4.x test runners, for version 4.5 or newer.

See: Description

Package mockit.integration.junit4 Description

Provides integration with JUnit 4.x test runners, for version 4.5 or newer. Contains the JMockit custom class runner.

This integration provides the following benefits to test code:

  1. Expected invocations specified through the Expectations API are automatically verified before the execution of a test is completed.
  2. Mock-up classes applied with the Mockups API from inside a method annotated as a @Test or a @Before method are discarded right after the execution of the test method or the whole test, respectively.
  3. Test methods accept mock parameters, whose values are mocked instances automatically created by JMockit and passed by the test runner when the test method is executed.
Skip navigation links
JMockit Home