JMockit Home

Package mockit

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

See: Description

Package mockit Description

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

The Expectations class provides an API for the traditional record-replay model of recording expected invocations which are later replayed and implicitly verified. This API makes use of the Mocked annotation.

The Verifications class, when combined with the NonStrictExpectations class or the NonStrict annotation, extends the record-replay model to a record-replay-verify model, where the record phase can be left empty, with expected invocations verified explicitly after exercising the code under test (ie, after the replay phase).

The Mockit class contains a group of setUpMock/setUpMocks static methods that can be used to set up state-oriented mock implementations. They rely on the Mock and MockClass annotations.

The MockUp<T> generic class (where T is the mocked type) is a convenient wrapper for common uses of the Mockit.setUpMock(Class, Object) and Mockit.setUpMock(Object) methods, which allows the definition of in-line mocks for individual tests.

JMockit Home

© 2006-2013 Rogério Liesenfeld