Package org.mockito.listeners
Interface VerificationStartedEvent
-
public interface VerificationStartedEvent
The instance of this class is passed toVerificationStartedListener
. For all the details, including how and why to use this API, seeVerificationStartedListener
.- Since:
- 2.11.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
getMock()
The mock object that will be used during verification.void
setMock(Object mock)
Replaces existing mock object for verification with a different one.
-
-
-
Method Detail
-
setMock
void setMock(Object mock)
Replaces existing mock object for verification with a different one. Needed for very advanced framework integrations. For all the details, including how and why seeVerificationStartedListener
.If this method is used to replace the mock the sibling method
getMock()
will return the new value. CAVEAT: ifsetMock(Object)
is invoked multiple times from one or many listeners the sibling methodgetMock()
will return mock that was set by most recent invocation ofsetMock(Object)
.- Parameters:
mock
- to be used for verification.- Since:
- 2.11.0
-
getMock
Object getMock()
The mock object that will be used during verification. See sibling methodsetMock(Object)
for more details. Please seeVerificationStartedListener
for all details of verification started listeners.- Since:
- 2.11.0
-
-