Class DefaultStubbingLookupListener
java.lang.Object
org.mockito.internal.junit.DefaultStubbingLookupListener
- All Implemented Interfaces:
Serializable, StubbingLookupListener
Default implementation of stubbing lookup listener.
Fails early if stub called with unexpected arguments, but only if current strictness is set to STRICT_STUBS.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) booleanIndicates that stubbing argument mismatch was reportedvoidCalled by the framework when Mockito looked up an answer for invocation on a mock.private static List<Invocation> potentialArgMismatches(Invocation invocation, Collection<Stubbing> stubbings) (package private) voidsetCurrentStrictness(Strictness currentStrictness) Enables resetting the strictness to desired level
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
currentStrictness
-
mismatchesReported
private boolean mismatchesReported
-
-
Constructor Details
-
DefaultStubbingLookupListener
DefaultStubbingLookupListener(Strictness strictness)
-
-
Method Details
-
onStubbingLookup
Description copied from interface:StubbingLookupListenerCalled by the framework when Mockito looked up an answer for invocation on a mock. For details, seeStubbingLookupListener.- Specified by:
onStubbingLookupin interfaceStubbingLookupListener- Parameters:
event- - Information about the looked up stubbing
-
potentialArgMismatches
private static List<Invocation> potentialArgMismatches(Invocation invocation, Collection<Stubbing> stubbings) -
setCurrentStrictness
Enables resetting the strictness to desired level -
isMismatchesReported
boolean isMismatchesReported()Indicates that stubbing argument mismatch was reported
-