Package | Description |
---|---|
org.mockito |
Mockito is a mock library for java - see Mockito class for for usage.
|
org.mockito.internal |
Internal classes, not to be used by clients.
|
org.mockito.internal.progress |
Mocking progress stateful classes.
|
org.mockito.internal.verification |
Verification logic.
|
org.mockito.internal.verification.checkers |
verification checkers
|
org.mockito.verification |
Modifier and Type | Method and Description |
---|---|
static 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.never()
Alias to
times(0) , see Mockito.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 Type | Method and Description |
---|---|
static <T> T |
Mockito.verify(T mock,
VerificationMode mode)
Verifies certain behavior happened at least once / exact number of times / never.
|
<T> T |
InOrder.verify(T mock,
VerificationMode mode)
Verifies interaction in order.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
InOrderImpl.verify(T mock,
VerificationMode mode) |
<T> T |
MockitoCore.verify(T mock,
VerificationMode mode) |
Modifier and Type | Method and Description |
---|---|
VerificationMode |
ThreadSafeMockingProgress.pullVerificationMode() |
VerificationMode |
MockingProgressImpl.pullVerificationMode() |
VerificationMode |
MockingProgress.pullVerificationMode() |
Modifier and Type | Method and Description |
---|---|
void |
ThreadSafeMockingProgress.verificationStarted(VerificationMode verify) |
void |
MockingProgressImpl.verificationStarted(VerificationMode verify) |
void |
MockingProgress.verificationStarted(VerificationMode verificationMode) |
Modifier and Type | Class and Description |
---|---|
class |
AtLeast |
class |
AtMost |
class |
InOrderWrapper |
class |
MockAwareVerificationMode |
class |
NoMoreInteractions |
class |
Only |
class |
Times |
Modifier and Type | Method and Description |
---|---|
static VerificationMode |
VerificationModeFactory.atLeast(int minNumberOfInvocations) |
static VerificationMode |
VerificationModeFactory.atLeastOnce() |
static VerificationMode |
VerificationModeFactory.atMost(int maxNumberOfInvocations) |
VerificationMode |
VerificationWithTimeoutImpl.getDelegate() |
static VerificationMode |
VerificationModeFactory.only() |
Constructor and Description |
---|
MockAwareVerificationMode(java.lang.Object mock,
VerificationMode mode) |
VerificationWithTimeoutImpl(int treshhold,
int millis,
VerificationMode delegate) |
Modifier and Type | Method and Description |
---|---|
void |
MissingInvocationInOrderChecker.check(java.util.List<Invocation> invocations,
InvocationMatcher wanted,
VerificationMode mode,
InOrderContext context) |
Modifier and Type | Interface and Description |
---|---|
interface |
VerificationWithTimeout
VerificationWithTimeout is a
VerificationMode that allows combining existing verification modes with 'timeout'. |
Modifier and Type | Class and Description |
---|---|
class |
Timeout
See the javadoc for
VerificationWithTimeout |
Modifier and Type | Method and Description |
---|---|
VerificationMode |
VerificationWithTimeout.atLeast(int minNumberOfInvocations)
Allows at-least-x verification withing given timeout.
|
VerificationMode |
Timeout.atLeast(int minNumberOfInvocations)
See the javadoc for
VerificationWithTimeout |
VerificationMode |
VerificationWithTimeout.atLeastOnce()
Allows at-least-once verification withing given timeout.
|
VerificationMode |
Timeout.atLeastOnce()
See the javadoc for
VerificationWithTimeout |
VerificationMode |
VerificationWithTimeout.atMost(int maxNumberOfInvocations)
Deprecated.
Deprecated
validation with timeout combined with atMost simply does not make sense...
The test would have passed immediately in the concurrent environment
To avoid compilation erros upon upgrade the method is deprecated and it throws a "friendly reminder" exception. In future release we will remove timeout(x).atMost(y) from the API. Do you want to find out more? See issue 235 |
VerificationMode |
Timeout.atMost(int maxNumberOfInvocations)
See the javadoc for
VerificationWithTimeout |
VerificationMode |
VerificationWithTimeout.never()
Alias to times(0), see
VerificationWithTimeout.times(int) |
VerificationMode |
Timeout.never()
See the javadoc for
VerificationWithTimeout |
VerificationMode |
VerificationWithTimeout.only()
Allows checking if given method was the only one invoked.
|
VerificationMode |
Timeout.only()
See the javadoc for
VerificationWithTimeout |
VerificationMode |
VerificationWithTimeout.times(int wantedNumberOfInvocations)
Allows verifying exact number of invocations within given timeout
|
VerificationMode |
Timeout.times(int wantedNumberOfInvocations)
See the javadoc for
VerificationWithTimeout |
Constructor and Description |
---|
Timeout(int millis,
VerificationMode delegate)
See the javadoc for
VerificationWithTimeout |