Package | Description |
---|---|
org.mockito |
Mockito is a mock library for java - see
Mockito class for usage. |
org.mockito.plugins |
Mockito plugins allow customization of behavior.
|
Modifier and Type | Method and Description |
---|---|
void |
MockedConstruction.MockInitializer.prepare(T mock,
MockedConstruction.Context context) |
Modifier and Type | Method and 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.
|
Modifier and Type | Method and Description |
---|---|
default <T> MockMaker.ConstructionMockControl<T> |
MockMaker.createConstructionMock(Class<T> type,
java.util.function.Function<MockedConstruction.Context,MockCreationSettings<T>> settingsFactory,
java.util.function.Function<MockedConstruction.Context,MockHandler<T>> handlerFactory,
MockedConstruction.MockInitializer<T> mockInitializer)
If you want to provide your own implementation of
MockMaker this method should:
Intercept all constructions of the specified type in the current thread
Only intercept the construction after being enabled.
Stops the interception when disabled.
|
default <T> MockMaker.ConstructionMockControl<T> |
MockMaker.createConstructionMock(Class<T> type,
java.util.function.Function<MockedConstruction.Context,MockCreationSettings<T>> settingsFactory,
java.util.function.Function<MockedConstruction.Context,MockHandler<T>> handlerFactory,
MockedConstruction.MockInitializer<T> mockInitializer)
If you want to provide your own implementation of
MockMaker this method should:
Intercept all constructions of the specified type in the current thread
Only intercept the construction after being enabled.
Stops the interception when disabled.
|