Uses of Interface
org.mockito.verification.VerificationMode
Package
Description
Mockito is a mock library for java - see
Mockito
class for usage.Verification related classes.
-
Uses of VerificationMode in org.mockito
Modifier and TypeMethodDescriptionstatic VerificationMode
Mockito.atLeast
(int minNumberOfInvocations) Allows at-least-x verification.static VerificationMode
Mockito.atLeastOnce()
Allows at-least-once verification.static VerificationMode
Mockito.atMost
(int maxNumberOfInvocations) Allows at-most-x verification.static VerificationMode
Mockito.atMostOnce()
Allows at-most-once verification.static VerificationMode
Mockito.calls
(int wantedNumberOfInvocations) Allows non-greedy verification in order.static VerificationMode
Mockito.description
(String description) Adds a description to be printed if verification fails.static VerificationMode
Mockito.never()
Alias totimes(0)
, seeMockito.times(int)
static VerificationMode
Mockito.only()
Allows checking if given method was the only one invoked.static VerificationMode
Mockito.times
(int wantedNumberOfInvocations) Allows verifying exact number of invocations.Modifier and TypeMethodDescriptionBDDMockito.Then.should
(InOrder inOrder, VerificationMode mode) BDDMockito.Then.should
(VerificationMode mode) void
InOrder.verify
(MockedStatic<?> mockedStatic, MockedStatic.Verification verification, VerificationMode mode) Verifies static interaction in order.<T> T
InOrder.verify
(T mock, VerificationMode mode) Verifies interaction in order.void
MockedStatic.verify
(MockedStatic.Verification verification, VerificationMode mode) static <T> T
Mockito.verify
(T mock, VerificationMode mode) Verifies certain behavior happened at least once / exact number of times / never. -
Uses of VerificationMode in org.mockito.internal.verification
Modifier and TypeClassDescriptionclass
org.mockito.internal.verification.VerificationWrapper<WrapperT extends VerificationMode>
-
Uses of VerificationMode in org.mockito.verification
Modifier and TypeInterfaceDescriptioninterface
VerificationAfterDelay is aVerificationMode
that allows combining existing verification modes with an initial delay, e.g.interface
VerificationWithTimeout is aVerificationMode
that allows combining existing verification modes with 'timeout'.Modifier and TypeClassDescriptionclass
See the javadoc forVerificationAfterDelay
class
See the javadoc forVerificationWithTimeout
Modifier and TypeMethodDescriptionVerificationAfterDelay.atLeast
(int minNumberOfInvocations) Verifies that there is are least N invocations during the given period.VerificationWithTimeout.atLeast
(int minNumberOfInvocations) Allows at-least-x verification within given timeout.VerificationAfterDelay.atLeastOnce()
Verifies that there is at least 1 invocation during the given period.VerificationWithTimeout.atLeastOnce()
Allows at-least-once verification within given timeout.Timeout.atMost
(int maxNumberOfInvocations) VerificationAfterDelay.atMost
(int maxNumberOfInvocations) Verifies that there is are most N invocations during the given period.VerificationAfterDelay.atMostOnce()
Verifies that there is most 1 invocation during the given period.protected VerificationMode
After.copySelfWithNewVerificationMode
(VerificationMode verificationMode) protected VerificationMode
Timeout.copySelfWithNewVerificationMode
(VerificationMode newVerificationMode) default VerificationMode
VerificationMode.description
(String description) Description will be prepended to the assertion error if verification fails.VerificationEvent.getMode()
VerificationStrategy.maybeVerifyLazily
(VerificationMode mode) Possibly wrap the given VerificationMode and return a wrapping VerificationMode instead.Timeout.never()
VerificationAfterDelay.never()
Allows verification that there are no invocations at any point during the given period.VerificationAfterDelay.only()
Verifies that there the given method is invoked and is the only method invoked.VerificationWithTimeout.only()
Allows checking if given method was the only one invoked.VerificationAfterDelay.times
(int wantedNumberOfInvocations) Verifies that there are exactly N invocations during the given period.VerificationWithTimeout.times
(int wantedNumberOfInvocations) Allows verifying exact number of invocations within given timeoutModifier and TypeMethodDescriptionprotected VerificationMode
After.copySelfWithNewVerificationMode
(VerificationMode verificationMode) protected VerificationMode
Timeout.copySelfWithNewVerificationMode
(VerificationMode newVerificationMode) VerificationStrategy.maybeVerifyLazily
(VerificationMode mode) Possibly wrap the given VerificationMode and return a wrapping VerificationMode instead.ModifierConstructorDescriptionAfter
(long delayMillis, VerificationMode verificationMode) See the javadoc forVerificationAfterDelay
Timeout
(long millis, VerificationMode delegate) See the javadoc forVerificationWithTimeout