Uses of Interface
org.mockito.invocation.MockHandler
-
Packages that use MockHandler Package Description org.mockito Mockito is a mock library for java - seeMockitoclass 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 MockHandlerMockingDetails. getMockHandler()Returns theMockHandlerassociated with this mock object. -
Uses of MockHandler in org.mockito.plugins
Methods in org.mockito.plugins that return MockHandler Modifier and Type Method Description MockHandlerMockMaker. getHandler(Object mock)Returns the handler for themock.Methods in org.mockito.plugins with parameters of type MockHandler Modifier and Type Method Description <T> TMockMaker. createMock(MockCreationSettings<T> settings, MockHandler handler)If you want to provide your own implementation ofMockMakerthis method should: Create a proxy object that implementssettings.typeToMockand potentially alsosettings.extraInterfaces. You may use the information fromsettingsto create/configure your proxy object. Your proxy object should carry thehandlerwith 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 ofMockMakerthis 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.voidMockMaker. resetMock(Object mock, MockHandler newHandler, MockCreationSettings settings)Replaces the existing handler onmockwithnewHandler.
-