Package | Description |
---|---|
org.mockito |
Mockito is a mock library for java - see
Mockito class for usage. |
org.mockito.internal |
Internal classes, not to be used by clients.
|
org.mockito.internal.framework | |
org.mockito.internal.junit |
JUnit integration support classes.
|
org.mockito.internal.session | |
org.mockito.internal.stubbing |
Stubbing logic.
|
org.mockito.junit |
Mockito JUnit integration ; rule and runners.
|
org.mockito.quality |
Mocking quality related classes.
|
org.mockito.session | |
org.mockito.stubbing |
Stubbing related classes.
|
Modifier and Type | Method and Description |
---|---|
void |
MockitoSession.setStrictness(Strictness strictness)
Changes the strictness of this
MockitoSession . |
Modifier and Type | Method and Description |
---|---|
Stubber |
MockitoCore.stubber(Strictness strictness) |
Modifier and Type | Method and Description |
---|---|
void |
DefaultMockitoSession.setStrictness(Strictness strictness) |
Constructor and Description |
---|
DefaultMockitoSession(java.util.List<java.lang.Object> testClassInstances,
java.lang.String name,
Strictness strictness,
MockitoLogger logger) |
Modifier and Type | Field and Description |
---|---|
private Strictness |
DefaultStubbingLookupListener.currentStrictness |
private Strictness |
UniversalTestListener.currentStrictness |
private Strictness |
JUnitRule.strictness |
Modifier and Type | Method and Description |
---|---|
(package private) void |
DefaultStubbingLookupListener.setCurrentStrictness(Strictness currentStrictness)
Enables resetting the strictness to desired level
|
void |
UniversalTestListener.setStrictness(Strictness strictness) |
MockitoRule |
JUnitRule.strictness(Strictness strictness) |
Constructor and Description |
---|
DefaultStubbingLookupListener(Strictness strictness) |
JUnitRule(MockitoLogger logger,
Strictness strictness) |
UniversalTestListener(Strictness initialStrictness,
MockitoLogger logger) |
Modifier and Type | Field and Description |
---|---|
private Strictness |
DefaultMockitoSessionBuilder.strictness |
Modifier and Type | Method and Description |
---|---|
MockitoSessionBuilder |
DefaultMockitoSessionBuilder.strictness(Strictness strictness) |
Modifier and Type | Field and Description |
---|---|
private Strictness |
InvocationContainerImpl.mockStrictness |
private Strictness |
StubberImpl.strictness |
private Strictness |
StubbedInvocationMatcher.strictness |
private Strictness |
OngoingStubbingImpl.strictness |
private Strictness |
DoAnswerStyleStubbing.stubbingStrictness |
Modifier and Type | Method and Description |
---|---|
static Strictness |
StrictnessSelector.determineStrictness(Stubbing stubbing,
MockCreationSettings mockSettings,
Strictness testLevelStrictness)
Determines the actual strictness in the following importance order:
1st - strictness configured when declaring stubbing;
2nd - strictness configured at mock level;
3rd - strictness configured at test level (rule, mockito session)
|
Strictness |
StubbedInvocationMatcher.getStrictness() |
(package private) Strictness |
DoAnswerStyleStubbing.getStubbingStrictness() |
Modifier and Type | Method and Description |
---|---|
StubbedInvocationMatcher |
InvocationContainerImpl.addAnswer(Answer answer,
boolean isConsecutive,
Strictness stubbingStrictness)
Adds new stubbed answer and returns the invocation matcher the answer was added to.
|
void |
InvocationContainerImpl.addAnswer(Answer answer,
Strictness stubbingStrictness) |
static Strictness |
StrictnessSelector.determineStrictness(Stubbing stubbing,
MockCreationSettings mockSettings,
Strictness testLevelStrictness)
Determines the actual strictness in the following importance order:
1st - strictness configured when declaring stubbing;
2nd - strictness configured at mock level;
3rd - strictness configured at test level (rule, mockito session)
|
(package private) void |
DoAnswerStyleStubbing.setAnswers(java.util.List<Answer<?>> answers,
Strictness stubbingStrictness) |
void |
InvocationContainerImpl.setAnswersForStubbing(java.util.List<Answer<?>> answers,
Strictness strictness)
Sets the answers declared with 'doAnswer' style.
|
void |
OngoingStubbingImpl.setStrictness(Strictness strictness) |
Constructor and Description |
---|
StubbedInvocationMatcher(Answer answer,
MatchableInvocation invocation,
Strictness strictness) |
StubberImpl(Strictness strictness) |
Modifier and Type | Method and Description |
---|---|
MockitoRule |
MockitoRule.strictness(Strictness strictness)
The strictness, especially "strict stubs" (
STRICT_STUBS )
helps debugging and keeping tests clean. |
Modifier and Type | Method and Description |
---|---|
static Strictness |
Strictness.valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Strictness[] |
Strictness.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
MockitoSessionBuilder |
MockitoSessionBuilder.strictness(Strictness strictness)
Configures strictness of
MockitoSession instance. |
Modifier and Type | Method and Description |
---|---|
Strictness |
Stubbing.getStrictness()
Informs about the
Strictness level of this stubbing. |