Package and Description |
---|
org.mockito.runners |
Interface and Description |
---|
org.mockito.configuration.AnnotationEngine
Please use
AnnotationEngine instead,
this interface will probably be removed in mockito 3. |
org.mockito.internal.creation.instance.Instantiator
since 2.15.4 because this internal class was leaking from the public API.
For more information why deprecated, see
InstantiatorProvider2 .
Use Instantiator instead.
Provides instances of classes. |
org.mockito.plugins.InstantiatorProvider
since 2.15.4 because this internal class was leaking from the public API.
For more information why deprecated, see
InstantiatorProvider2 and
Issue 1303
Mockito will invoke this interface in order to fetch an instance instantiator provider. By default, an internal byte-buddy/asm/objenesis based implementation is used. Using the extension point
The plugin mechanism of mockito works in a similar way as the
Note that if several
So just create a custom implementation of
This class is deprecated and was replaced by
|
org.mockito.internal.InternalMockHandler |
org.mockito.MockitoDebugger
- please use
MockingDetails.printInvocations() instead.
An instance of MockingDetails can be retrieved via Mockito.mockingDetails(Object) . |
Class and Description |
---|
org.mockito.runners.ConsoleSpammingMockitoJUnitRunner
as of 2.1.0. Use the
MockitoJUnitRunner runner instead
which contains support for detecting unused stubs.
If you still prefer using this runner, tell us why (create ticket in our issue tracker). |
org.mockito.internal.junit.util.JUnitFailureHacker |
org.mockito.Matchers
Use
ArgumentMatchers . This class is now deprecated in order to avoid a name clash with Hamcrest
org.hamcrest.Matchers class. This class will likely be removed in version 3.0. |
org.mockito.runners.MockitoJUnitRunner
Moved to
MockitoJUnitRunner , this class will be removed with Mockito 3 |
org.mockito.runners.MockitoJUnitRunner.Silent
Moved to
MockitoJUnitRunner.Silent , this class will be removed with Mockito 3 |
org.mockito.runners.MockitoJUnitRunner.Strict
Moved to
MockitoJUnitRunner.Strict , this class will be removed with Mockito 3 |
org.mockito.internal.invocation.UnusedStubsFinder |
org.mockito.runners.VerboseMockitoJUnitRunner
as of 2.1.0. Use the
MockitoJUnitRunner runner instead
which contains support for detecting unused stubs.
If you still prefer using this runner, tell us why (create ticket in our issue tracker). |
org.mockito.internal.debugging.WarningsCollector |
Exceptions and Description |
---|
org.mockito.internal.creation.instance.InstantiationException
since 2.15.4 because this internal class was leaking from the public API.
For information why deprecated, see
InstantiatorProvider2 .
Use Instantiator and InstantiationException types instead.
Exception generated when |
Method and Description |
---|
org.mockito.ArgumentMatchers.anyCollectionOf(Class<T>)
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic
friendliness to avoid casting, this is not anymore needed in Java 8.
|
org.mockito.ArgumentMatchers.anyIterableOf(Class<T>)
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic
friendliness to avoid casting, this is not anymore needed in Java 8.
|
org.mockito.ArgumentMatchers.anyListOf(Class<T>)
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic
friendliness to avoid casting, this is not anymore needed in Java 8.
|
org.mockito.ArgumentMatchers.anyMapOf(Class<K>, Class<V>)
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic
friendliness to avoid casting, this is not anymore needed in Java 8.
|
org.mockito.ArgumentMatchers.anyObject()
This will be removed in Mockito 3.0 (which will be java 8 only)
|
org.mockito.ArgumentMatchers.anySetOf(Class<T>)
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic
friendliness to avoid casting, this is not anymore needed in Java 8.
|
org.mockito.ArgumentMatchers.anyVararg()
as of 2.1.0 use
ArgumentMatchers.any() |
org.mockito.invocation.InvocationFactory.createInvocation(Object, MockCreationSettings, Method, Callable, Object...)
Use
InvocationFactory.createInvocation(Object, MockCreationSettings, Method, RealMethodBehavior, Object...) instead.
Why deprecated? We found use cases where we need to handle Throwable and ensure correct stack trace filtering
(removing Mockito internals from the stack trace). Hence the introduction of InvocationFactory.RealMethodBehavior .
Creates instance of an Invocation object.
This method is useful for framework integrators to programmatically simulate method calls on mocks using MockHandler .
It enables advanced framework integrations. |
org.mockito.Mockito.debug()
- please use
MockingDetails.printInvocations() instead.
An instance of MockingDetails can be retrieved via Mockito.mockingDetails(Object) . |
org.mockito.runners.MockitoJUnitRunner.filter(Filter) |
org.mockito.Answers.get()
as of 2.1.0 Use the enum-constant directly, instead of this getter. This method will be removed in a future release
E.g. instead of Answers.CALLS_REAL_METHODS.get() use Answers.CALLS_REAL_METHODS . |
org.mockito.configuration.IMockitoConfiguration.getAnnotationEngine()
Please use the extension mechanism
AnnotationEngine instead,
this method will probably be removed in mockito 3. |
org.mockito.runners.MockitoJUnitRunner.getDescription() |
org.mockito.plugins.InstantiatorProvider.getInstantiator(MockCreationSettings<?>) |
org.mockito.internal.verification.api.VerificationData.getWanted()
- This internal method leaks internal class
InvocationMatcher .
Please use VerificationData.getTarget() instead.
Deprecated since 2.2.12 |
org.mockito.ArgumentMatchers.isNotNull(Class<T>)
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic
friendliness to avoid casting, this is not anymore needed in Java 8.
|
org.mockito.ArgumentMatchers.isNull(Class<T>)
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic
friendliness to avoid casting, this is not anymore needed in Java 8.
|
org.mockito.ArgumentMatchers.notNull(Class<T>)
With Java 8 this method will be removed in Mockito 3.0. This method is only used for generic
friendliness to avoid casting, this is not anymore needed in Java 8.
|
org.mockito.MockitoDebugger.printInvocations(Object...)
- please use
MockingDetails.printInvocations() instead.
An instance of MockingDetails can be retrieved via Mockito.mockingDetails(Object) . |
org.mockito.internal.debugging.MockitoDebuggerImpl.printInvocations(Object...) |
org.mockito.runners.MockitoJUnitRunner.run(RunNotifier) |
org.mockito.BDDMockito.BDDStubber.willNothing()
as of 2.1.0 please use
BDDMockito.BDDStubber.willDoNothing() instead |
org.mockito.BDDMockito.BDDStubberImpl.willNothing()
please use
BDDMockito.BDDStubberImpl.willDoNothing() instead |
Constructor and Description |
---|
org.mockito.internal.configuration.plugins.PluginLoader(PluginSwitch, String)
Let's avoid adding more aliases. It complicates the API.
Instead of an alias, we can use fully qualified class name of the alternative implementation.
Adds an alias for a class name to this plugin loader. Instead of the fully qualified type name, the alias can be used as a convenience name for a known plugin. |