Skip navigation links
JMockit Home

Package mockit

Provides the classes and annotations used when writing tests with the JMockit mocking and faking APIs.

See: Description

Package mockit Description

Provides the classes and annotations used when writing tests with the JMockit mocking and faking APIs.

The Expectations class provides an API for the record-replay model of recording expected invocations which are later replayed and implicitly verified. This API makes use of the @Mocked annotation (among others). The Verifications class extends the record-replay model to a record-replay-verify model, where expectations that were not recorded can be verified explicitly after exercising the code under test (ie, after the replay phase).

The MockUp<T> generic class (where T is the mocked type) allows the definition of fake implementations for external classes or interfaces.

For a description with examples of the Expectations API, see the "Mocking" chapter in the Tutorial. For the Mockups API, see the "Faking" chapter.

Skip navigation links
JMockit Home