All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mockit.UsingMocksAndStubs Maven / Gradle / Ivy

Go to download

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(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy