Uses of Interface
org.mockito.invocation.MockHandler
Package
Description
Mockito is a mock library for java - see
Mockito
class for usage.Mockito plugins allow customization of behavior.
-
Uses of MockHandler in org.mockito
Modifier and TypeMethodDescriptionMockingDetails.getMockHandler()
Returns theMockHandler
associated with this mock object. -
Uses of MockHandler in org.mockito.plugins
Modifier and TypeMethodDescriptionMockMaker.getHandler
(Object mock) Returns the handler for themock
.Modifier and TypeMethodDescription<T> T
MockMaker.createMock
(MockCreationSettings<T> settings, MockHandler handler) If you want to provide your own implementation ofMockMaker
this method should: Create a proxy object that implementssettings.typeToMock
and potentially alsosettings.extraInterfaces
. You may use the information fromsettings
to create/configure your proxy object. Your proxy object should carry thehandler
with it.default <T> Optional<T>
MockMaker.createSpy
(MockCreationSettings<T> settings, MockHandler handler, T instance) By implementing this method, a mock maker can optionally support the creation of spies where all fields are set within a constructor.default <T> MockMaker.StaticMockControl<T>
MockMaker.createStaticMock
(Class<T> type, MockCreationSettings<T> settings, MockHandler handler) If you want to provide your own implementation ofMockMaker
this method should: Alter the supplied class to only change its behavior in the current thread. Only alters the static method's behavior after being enabled. Stops the altered behavior when disabled.void
MockMaker.resetMock
(Object mock, MockHandler newHandler, MockCreationSettings settings) Replaces the existing handler onmock
withnewHandler
.