mockit.UsingMocksAndStubs 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.
The newest version!
/*
* Copyright (c) 2006-2014 Rogério Liesenfeld
* This file is subject to the terms of the MIT license (see LICENSE.txt).
*/
package mockit;
import java.lang.annotation.*;
/**
* Indicates one or more {@linkplain #value() classes} to be mocked or stubbed out for the whole test class or the whole
* test suite (in the case of a JUnit 4 test suite definition class).
*
* @see MockUp
* @deprecated Apply the desired mock-up classes in a {@code @BeforeClass} method instead.
*/
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Deprecated
public @interface UsingMocksAndStubs
{
/**
* A mix of mock and real classes from which the set of methods and constructors to be mocked or stubbed out is
* obtained.
*
* A mock class is one which extends the {@linkplain MockUp MockUp<T>} base class.
* It can define mocks and/or stubs for individual methods/constructors in a real class.
* Any other kind of class passed in this attribute is regarded as a "real class", which will have all of its methods
* and constructors, as well static initializers, stubbed out.
*/
Class>[] value();
}