mockit.package-info Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jmockit Show documentation
Show all versions of jmockit Show documentation
JMockit is a Java toolkit for developer (unit/integration) testing.
It contains mocking APIs and other tools, supporting both JUnit and TestNG.
The mocking APIs allow all kinds of Java code, without testability restrictions, to be tested
in isolation from selected dependencies.
/*
* Copyright (c) 2006-2011 Rogério Liesenfeld
* This file is subject to the terms of the MIT license (see LICENSE.txt).
*/
/**
* Provides the classes and annotations used when writing tests with the JMockit mocking APIs.
*
* The {@link mockit.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 {@link mockit.Mocked} annotation.
*
* The {@link mockit.Verifications} class, when combined with the {@link mockit.NonStrictExpectations} class or the
* {@link mockit.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 {@link mockit.Mockit} class contains a group of {@code setUpMock/setUpMocks} static methods that can be used to
* set up state-oriented mock implementations.
* They rely on the {@link mockit.Mock} and {@link mockit.MockClass} annotations.
*
* The {@linkplain mockit.MockUp MockUp<T>
} generic class (where {@code T} is the mocked type) is a
* convenient wrapper for common uses of the {@link mockit.Mockit#setUpMock(Class, Object)} and
* {@link mockit.Mockit#setUpMock(Object)} methods, which allows the definition of in-line mocks for individual tests.
*/
package mockit;