public class GlobalConfiguration extends Object implements IMockitoConfiguration, Serializable
| Constructor and Description |
|---|
GlobalConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cleansStackTrace()
This should be turned on unless you're a Mockito developer and you wish
to have verbose (read: messy) stack traces that only few understand (eg:
Mockito developers)
|
boolean |
enableClassCache()
Allow objenesis to cache classes.
|
AnnotationEngine |
getAnnotationEngine()
Configures annotations for mocks.
|
Answer<Object> |
getDefaultAnswer()
Allows configuring the default answers of unstubbed invocations
|
AnnotationEngine |
tryGetPluginAnnotationEngine() |
static void |
validate() |
public static void validate()
public AnnotationEngine getAnnotationEngine()
IMockitoConfiguration
This method will have lower priority that the new extension mechanism.
That is if it exists on the classpath both a class org.mockito.configuration.MockitoConfiguration
and a file mockito-extensions/org.mockito.plugins.AnnotationEngine then the implementation of
org.mockito.configuration.MockitoConfiguration will be chosen instead of the one in the file.
See javadoc for IMockitoConfiguration
getAnnotationEngine in interface IMockitoConfigurationpublic AnnotationEngine tryGetPluginAnnotationEngine()
public boolean cleansStackTrace()
IMockitoConfiguration
See javadoc for IMockitoConfiguration
cleansStackTrace in interface IMockitoConfigurationpublic boolean enableClassCache()
IMockitoConfigurationenableClassCache in interface IMockitoConfigurationpublic Answer<Object> getDefaultAnswer()
IMockitoConfiguration
See javadoc for IMockitoConfiguration
getDefaultAnswer in interface IMockitoConfigurationCopyright © 2024. All rights reserved.