Uses of Interface
org.mockito.verification.VerificationMode
Packages that use VerificationMode
Package
Description
Mockito is a mock library for java - see
Mockito
class for usage.Internal classes, not to be used by clients.
JUnit integration support classes.
Mocking progress stateful classes.
Verification logic.
Verification related classes.
-
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.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.Methods in org.mockito with parameters of type VerificationModeModifier and TypeMethodDescriptionBDDMockito.Then.should
(InOrder inOrder, VerificationMode mode) BDDMockito.Then.should
(VerificationMode mode) BDDMockito.ThenImpl.should
(InOrder inOrder, VerificationMode mode) BDDMockito.ThenImpl.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
Methods in org.mockito.internal with parameters of type VerificationModeModifier and TypeMethodDescriptionvoid
InOrderImpl.verify
(MockedStatic<?> mockedStatic, MockedStatic.Verification verification, VerificationMode mode) <T> T
InOrderImpl.verify
(T mock, VerificationMode mode) void
MockedStaticImpl.verify
(MockedStatic.Verification verification, VerificationMode mode) <T> T
MockitoCore.verify
(T mock, VerificationMode mode) -
Uses of VerificationMode in org.mockito.internal.junit
Classes in org.mockito.internal.junit that implement VerificationModeFields in org.mockito.internal.junit declared as VerificationModeModifier and TypeFieldDescriptionprivate final VerificationMode
VerificationCollectorImpl.VerificationWrapper.delegate
Methods in org.mockito.internal.junit that return VerificationModeModifier and TypeMethodDescriptionVerificationCollectorImpl.VerificationWrapper.description
(String description) Constructors in org.mockito.internal.junit with parameters of type VerificationMode -
Uses of VerificationMode in org.mockito.internal.progress
Fields in org.mockito.internal.progress with type parameters of type VerificationModeModifier and TypeFieldDescriptionprivate Localized
<VerificationMode> MockingProgressImpl.verificationMode
Methods in org.mockito.internal.progress that return VerificationModeModifier and TypeMethodDescriptionMockingProgress.maybeVerifyLazily
(VerificationMode mode) MockingProgressImpl.maybeVerifyLazily
(VerificationMode mode) MockingProgress.pullVerificationMode()
MockingProgressImpl.pullVerificationMode()
Methods in org.mockito.internal.progress with parameters of type VerificationModeModifier and TypeMethodDescriptionMockingProgress.maybeVerifyLazily
(VerificationMode mode) MockingProgressImpl.maybeVerifyLazily
(VerificationMode mode) void
MockingProgress.verificationStarted
(VerificationMode verificationMode) void
MockingProgressImpl.verificationStarted
(VerificationMode verify) -
Uses of VerificationMode in org.mockito.internal.verification
Classes in org.mockito.internal.verification with type parameters of type VerificationModeClasses in org.mockito.internal.verification that implement VerificationModeModifier and TypeClassDescriptionclass
class
class
class
Description verification mode wraps an existing verification mode and prepends a custom message to the assertion error if verification fails.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.class
VerificationWrapper<WrapperT extends VerificationMode>
class
Fields in org.mockito.internal.verification declared as VerificationModeModifier and TypeFieldDescriptionprivate final VerificationMode
VerificationOverTimeImpl.delegate
private final VerificationMode
VerificationWrapperInOrderWrapper.delegate
private final VerificationMode
MockAwareVerificationMode.mode
private final VerificationMode
VerificationEventImpl.mode
private final VerificationMode
Description.verification
protected final WrapperT
VerificationWrapper.wrappedVerification
Methods in org.mockito.internal.verification that return VerificationModeModifier and TypeMethodDescriptionstatic VerificationMode
VerificationModeFactory.atLeast
(int minNumberOfInvocations) VerificationWrapper.atLeast
(int minNumberOfInvocations) static VerificationMode
VerificationModeFactory.atLeastOnce()
VerificationWrapper.atLeastOnce()
static VerificationMode
VerificationModeFactory.atMost
(int maxNumberOfInvocations) VerificationWrapper.atMost
(int maxNumberOfInvocations) static VerificationMode
VerificationModeFactory.atMostOnce()
VerificationWrapper.atMostOnce()
protected abstract VerificationMode
VerificationWrapper.copySelfWithNewVerificationMode
(VerificationMode verificationMode) Times.description
(String description) static VerificationMode
VerificationModeFactory.description
(VerificationMode mode, String description) Verification mode will prepend the specified failure message if verification fails with the given implementation.VerificationOverTimeImpl.getDelegate()
VerificationEventImpl.getMode()
VerificationWrapper.never()
static VerificationMode
VerificationModeFactory.only()
VerificationWrapper.only()
VerificationWrapper.times
(int wantedNumberOfInvocations) private VerificationMode
VerificationWrapperInOrderWrapper.wrapInOrder
(VerificationWrapper<?> verificationWrapper, VerificationMode verificationMode, InOrderImpl inOrder) Methods in org.mockito.internal.verification with parameters of type VerificationModeModifier and TypeMethodDescriptionprotected boolean
VerificationOverTimeImpl.canRecoverFromFailure
(VerificationMode verificationMode) protected abstract VerificationMode
VerificationWrapper.copySelfWithNewVerificationMode
(VerificationMode verificationMode) VerificationOverTimeImpl.copyWithVerificationMode
(VerificationMode verificationMode) static VerificationMode
VerificationModeFactory.description
(VerificationMode mode, String description) Verification mode will prepend the specified failure message if verification fails with the given implementation.private VerificationMode
VerificationWrapperInOrderWrapper.wrapInOrder
(VerificationWrapper<?> verificationWrapper, VerificationMode verificationMode, InOrderImpl inOrder) Constructors in org.mockito.internal.verification with parameters of type VerificationModeModifierConstructorDescriptionDescription
(VerificationMode verification, String description) Constructs a verification mode which wraps the given verification mode.MockAwareVerificationMode
(Object mock, VerificationMode mode, Set<VerificationListener> listeners) VerificationEventImpl
(Object mock, VerificationMode mode, VerificationData data, Throwable cause) 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, 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.verification
Subinterfaces 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
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.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 timeoutMethods in org.mockito.verification with parameters of type VerificationModeModifier 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.Constructors in org.mockito.verification with parameters of type VerificationModeModifierConstructorDescription(package private)
After
(long pollingPeriod, long delayMillis, VerificationMode verificationMode) After
(long delayMillis, VerificationMode verificationMode) See the javadoc forVerificationAfterDelay
(package private)
Timeout
(long pollingPeriodMillis, long millis, VerificationMode delegate) See the javadoc forVerificationWithTimeout
Timeout
(long millis, VerificationMode delegate) See the javadoc forVerificationWithTimeout
(package private)
Timeout
(long pollingPeriodMillis, VerificationMode delegate, Timer timer) See the javadoc forVerificationWithTimeout