Package org.mockito.internal.stubbing
Class InvocationContainerImpl
java.lang.Object
org.mockito.internal.stubbing.InvocationContainerImpl
- All Implemented Interfaces:
Serializable
,InvocationContainer
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DoAnswerStyleStubbing
private MatchableInvocation
private final Strictness
private final RegisteredInvocations
private static final long
private final LinkedList<StubbedInvocationMatcher>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAnswer
(Answer answer, boolean isConsecutive, Strictness stubbingStrictness) Adds new stubbed answer and returns the invocation matcher the answer was added to.void
addAnswer
(Answer answer, Strictness stubbingStrictness) void
addConsecutiveAnswer
(Answer answer) (package private) Object
answerTo
(Invocation invocation) void
private RegisteredInvocations
createRegisteredInvocations
(MockCreationSettings mockSettings) findAnswerFor
(Invocation invocation) Stubbings in ascending order, most recent lastStubbings in descending order, most recent firstboolean
boolean
void
resetInvocationForPotentialStubbing
(MatchableInvocation invocationMatcher) void
setAnswersForStubbing
(List<Answer<?>> answers, Strictness strictness) Sets the answers declared with 'doAnswer' style.void
setInvocationForPotentialStubbing
(MatchableInvocation invocation) void
setMethodForStubbing
(MatchableInvocation invocation) toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
stubbed
-
doAnswerStyleStubbing
-
registeredInvocations
-
mockStrictness
-
invocationForStubbing
-
-
Constructor Details
-
InvocationContainerImpl
-
-
Method Details
-
setInvocationForPotentialStubbing
-
resetInvocationForPotentialStubbing
-
addAnswer
-
addAnswer
public StubbedInvocationMatcher addAnswer(Answer answer, boolean isConsecutive, Strictness stubbingStrictness) Adds new stubbed answer and returns the invocation matcher the answer was added to. -
addConsecutiveAnswer
-
answerTo
- Throws:
Throwable
-
findAnswerFor
-
setAnswersForStubbing
Sets the answers declared with 'doAnswer' style. -
hasAnswersForStubbing
public boolean hasAnswersForStubbing() -
hasInvocationForPotentialStubbing
public boolean hasInvocationForPotentialStubbing() -
setMethodForStubbing
-
toString
-
getInvocations
-
clearInvocations
public void clearInvocations() -
getStubbingsDescending
Stubbings in descending order, most recent first -
getStubbingsAscending
Stubbings in ascending order, most recent last -
invokedMock
-
getInvocationForStubbing
-
createRegisteredInvocations
-