Uses of Interface
org.mockito.verification.VerificationMode
Packages that use VerificationMode
Package
Description
Mockito is a mock library for java - see Mockito class for for usage.
Internal classes, not to be used by clients.
Mocking progress stateful classes.
Verification logic.
verification checkers
-
Uses of VerificationMode in org.mockito
Methods in org.mockito that return VerificationModeModifier 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.calls
(int wantedNumberOfInvocations) Allows non-greedy verification in order.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.Methods in org.mockito with parameters of type VerificationModeModifier and TypeMethodDescriptionBDDMockito.Then.should
(VerificationMode mode) <T> T
InOrder.verify
(T mock, VerificationMode mode) Verifies interaction in order.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
Methods in org.mockito.internal with parameters of type VerificationModeModifier and TypeMethodDescription<T> T
InOrderImpl.verify
(T mock, VerificationMode mode) <T> T
MockitoCore.verify
(T mock, VerificationMode mode) -
Uses of VerificationMode in org.mockito.internal.progress
Methods in org.mockito.internal.progress that return VerificationModeModifier and TypeMethodDescriptionMockingProgress.pullVerificationMode()
MockingProgressImpl.pullVerificationMode()
ThreadSafeMockingProgress.pullVerificationMode()
Methods in org.mockito.internal.progress with parameters of type VerificationModeModifier and TypeMethodDescriptionvoid
MockingProgress.verificationStarted
(VerificationMode verificationMode) void
MockingProgressImpl.verificationStarted
(VerificationMode verify) void
ThreadSafeMockingProgress.verificationStarted
(VerificationMode verify) -
Uses of VerificationMode in org.mockito.internal.verification
Classes in org.mockito.internal.verification that implement VerificationModeModifier and TypeClassDescriptionclass
class
class
class
class
class
class
class
class
Verifies that another verification mode (the delegate) is satisfied within a certain timeframe (before timeoutMillis has passed, measured from the call to verify()), and either returns immediately once it does, or waits until it is definitely satisfied once the full time has passed.Methods in org.mockito.internal.verification that return VerificationModeModifier and TypeMethodDescriptionstatic VerificationMode
VerificationModeFactory.atLeast
(int minNumberOfInvocations) static VerificationMode
VerificationModeFactory.atLeastOnce()
static VerificationMode
VerificationModeFactory.atMost
(int maxNumberOfInvocations) VerificationOverTimeImpl.getDelegate()
static VerificationMode
VerificationModeFactory.only()
Methods in org.mockito.internal.verification with parameters of type VerificationModeModifier and TypeMethodDescriptionprotected boolean
VerificationOverTimeImpl.canRecoverFromFailure
(VerificationMode verificationMode) Constructors in org.mockito.internal.verification with parameters of type VerificationModeModifierConstructorDescriptionMockAwareVerificationMode
(Object mock, VerificationMode mode) VerificationOverTimeImpl
(long pollingPeriodMillis, long durationMillis, VerificationMode delegate, boolean returnOnSuccess) Create this verification mode, to be used to verify invocation ongoing data later.VerificationOverTimeImpl
(long pollingPeriodMillis, long durationMillis, VerificationMode delegate, boolean returnOnSuccess, Timer timer) Create this verification mode, to be used to verify invocation ongoing data later. -
Uses of VerificationMode in org.mockito.internal.verification.checkers
Methods in org.mockito.internal.verification.checkers with parameters of type VerificationModeModifier and TypeMethodDescriptionvoid
MissingInvocationInOrderChecker.check
(List<Invocation> invocations, InvocationMatcher wanted, VerificationMode mode, InOrderContext context) -
Uses of VerificationMode in org.mockito.verification
Classes in org.mockito.verification with type parameters of type VerificationModeSubinterfaces of VerificationMode in org.mockito.verificationModifier 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'.Classes in org.mockito.verification that implement VerificationModeModifier and TypeClassDescriptionclass
See the javadoc forVerificationAfterDelay
class
See the javadoc forVerificationWithTimeout
class
VerificationWrapper<WrapperType extends VerificationMode>
Fields in org.mockito.verification declared as VerificationModeModifier and TypeFieldDescriptionprotected final WrapperType
VerificationWrapper.wrappedVerification
Methods in org.mockito.verification that return VerificationModeModifier 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.VerificationWrapper.atLeast
(int minNumberOfInvocations) VerificationAfterDelay.atLeastOnce()
Verifies that there is at least 1 invocation during the given period.VerificationWithTimeout.atLeastOnce()
Allows at-least-once verification within given timeout.VerificationWrapper.atLeastOnce()
Timeout.atMost
(int maxNumberOfInvocations) VerificationAfterDelay.atMost
(int maxNumberOfInvocations) Verifies that there is are most N invocations during the given period.VerificationWithTimeout.atMost
(int maxNumberOfInvocations) Deprecated.Deprecated Validation with timeout combined with never simply does not make sense, as atMost() will typically immediately pass, and therefore not wait the timeout.VerificationWrapper.atMost
(int maxNumberOfInvocations) protected VerificationMode
After.copySelfWithNewVerificationMode
(VerificationMode verificationMode) protected VerificationMode
Timeout.copySelfWithNewVerificationMode
(VerificationMode newVerificationMode) protected abstract VerificationMode
VerificationWrapper.copySelfWithNewVerificationMode
(VerificationMode verificationMode) Timeout.never()
VerificationAfterDelay.never()
Allows verification that there are no invocations at any point during the given period.VerificationWithTimeout.never()
Deprecated.Validation with timeout combined with never simply does not make sense, as never() will typically immediately pass, and therefore not wait the timeout.VerificationWrapper.never()
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.VerificationWrapper.only()
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 timeoutVerificationWrapper.times
(int wantedNumberOfInvocations) Methods in org.mockito.verification with parameters of type VerificationModeModifier and TypeMethodDescriptionprotected VerificationMode
After.copySelfWithNewVerificationMode
(VerificationMode verificationMode) protected VerificationMode
Timeout.copySelfWithNewVerificationMode
(VerificationMode newVerificationMode) protected abstract VerificationMode
VerificationWrapper.copySelfWithNewVerificationMode
(VerificationMode verificationMode) Constructors in org.mockito.verification with parameters of type VerificationModeModifierConstructorDescriptionAfter
(long pollingPeriod, long delayMillis, VerificationMode verificationMode) After
(long delayMillis, VerificationMode verificationMode) See the javadoc forVerificationAfterDelay
Timeout
(long millis, VerificationMode delegate) See the javadoc forVerificationWithTimeout