Uses of Interface
org.mockito.MockSettings
-
Packages that use MockSettings Package Description org.mockito Mockito is a mock library for java - seeMockitoclass for usage. -
-
Uses of MockSettings in org.mockito
Methods in org.mockito that return MockSettings Modifier and Type Method Description MockSettingsMockSettings. defaultAnswer(Answer defaultAnswer)Specifies default answers to interactions.MockSettingsMockSettings. extraInterfaces(Class<?>... interfaces)Specifies extra interfaces the mock should implement.MockSettingsMockSettings. invocationListeners(InvocationListener... listeners)Registers a listener for method invocations on this mock.MockSettingsMockSettings. lenient()Deprecated.Usestrictness(Strictness)instead.MockSettingsMockSettings. name(String name)Specifies mock name.MockSettingsMockSettings. outerInstance(Object outerClassInstance)Makes it possible to mock non-static inner classes in conjunction withuseConstructor(Object...).MockSettingsMockSettings. serializable()Configures the mock to be serializable.MockSettingsMockSettings. serializable(SerializableMode mode)Configures the mock to be serializable with a specific serializable mode.MockSettingsMockSettings. spiedInstance(Object instance)Specifies the instance to spy on.MockSettingsMockSettings. strictness(Strictness strictness)Specifies strictness level for the mock.MockSettingsMockSettings. stubbingLookupListeners(StubbingLookupListener... listeners)Add stubbing lookup listener to the mock object.MockSettingsMockSettings. stubOnly()A stub-only mock does not record method invocations, thus saving memory but disallowing verification of invocations.MockSettingsMockSettings. useConstructor(Object... args)Mockito attempts to use constructor when creating instance of the mock.MockSettingsMockSettings. verboseLogging()Enables real-time logging of method invocations on this mock.MockSettingsMockSettings. verificationStartedListeners(VerificationStartedListener... listeners)Registers a listener(s) that will be notified when user starts verification.MockSettingsMockSettings. withoutAnnotations()By default, Mockito makes an attempt to preserve all annotation meta data on the mocked type and its methods to mirror the mocked type as closely as possible.static MockSettingsMockito. withSettings()Allows mock creation with additional mock settings.Methods in org.mockito with parameters of type MockSettings Modifier and Type Method Description static <T> TMockito. mock(Class<T> classToMock, MockSettings mockSettings)Creates a mock with some non-standard settings.static <T> MockedConstruction<T>Mockito. mockConstruction(Class<T> classToMock, MockSettings mockSettings)Creates a thread-local mock controller for all constructions of the given class.static <T> MockedConstruction<T>Mockito. mockConstruction(Class<T> classToMock, MockSettings mockSettings, MockedConstruction.MockInitializer<T> mockInitializer)Creates a thread-local mock controller for all constructions of the given class.static <T> MockedStatic<T>Mockito. mockStatic(Class<T> classToMock, MockSettings mockSettings)Creates a thread-local mock controller for all static methods of the given class or interface.Method parameters in org.mockito with type arguments of type MockSettings Modifier and Type Method Description static <T> MockedConstruction<T>Mockito. mockConstruction(Class<T> classToMock, java.util.function.Function<MockedConstruction.Context,MockSettings> mockSettingsFactory)Creates a thread-local mock controller for all constructions of the given class.static <T> MockedConstruction<T>Mockito. mockConstruction(Class<T> classToMock, java.util.function.Function<MockedConstruction.Context,MockSettings> mockSettingsFactory, MockedConstruction.MockInitializer<T> mockInitializer)Creates a thread-local mock controller for all constructions of the given class.
-