Uses of Interface
org.mockito.invocation.MockHandler
-
Packages that use MockHandler Package Description org.mockito Mockito is a mock library for java - seeMockito
class for usage.org.mockito.plugins Mockito plugins allow customization of behavior. -
-
Uses of MockHandler in org.mockito
Methods in org.mockito that return MockHandler Modifier and Type Method Description MockHandler
MockingDetails. getMockHandler()
Returns theMockHandler
associated with this mock object. -
Uses of MockHandler in org.mockito.plugins
Methods in org.mockito.plugins that return MockHandler Modifier and Type Method Description MockHandler
MockMaker. getHandler(Object mock)
Returns the handler for themock
.Methods in org.mockito.plugins with parameters of type MockHandler Modifier and Type Method Description <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
.
-