A test runner for JUnit 4.5+, with special modifications to integrate with JMockit.
JMockitcustom test runner (which is not an actual test runner, but just a way to ensure that JMockit gets properly initialized - a better way is to simply put
junit-4.x.jarin the test runtime classpath). This integration provides the following benefits to test code:
@Capturingare properly initialized.
@Capturing), whose values are mocked instances automatically created by JMockit and passed by the test runner when the test method is executed.
@Beforemethod are discarded right after the execution of the test method or the whole test, respectively. Similarly, fakes applied from a
@BeforeClassmethod are discarded after all tests in a test class have executed.