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 DoAnswerStyleStubbingprivate MatchableInvocationprivate final Strictnessprivate final RegisteredInvocationsprivate static final longprivate 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.voidaddAnswer(Answer answer, Strictness stubbingStrictness) voidaddConsecutiveAnswer(Answer answer) (package private) ObjectanswerTo(Invocation invocation) voidprivate RegisteredInvocationscreateRegisteredInvocations(MockCreationSettings mockSettings) findAnswerFor(Invocation invocation) Stubbings in ascending order, most recent lastStubbings in descending order, most recent firstbooleanbooleanvoidresetInvocationForPotentialStubbing(MatchableInvocation invocationMatcher) voidsetAnswersForStubbing(List<Answer<?>> answers, Strictness strictness) Sets the answers declared with 'doAnswer' style.voidsetInvocationForPotentialStubbing(MatchableInvocation invocation) voidsetMethodForStubbing(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
-