Package org.mockito.internal.stubbing
Class InvocationContainerImpl
- java.lang.Object
-
- org.mockito.internal.stubbing.InvocationContainerImpl
-
- All Implemented Interfaces:
java.io.Serializable,InvocationContainer
public class InvocationContainerImpl extends java.lang.Object implements InvocationContainer, java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InvocationContainerImpl(MockingProgress mockingProgress, MockCreationSettings mockSettings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAnswer(Answer answer)voidaddAnswer(Answer answer, boolean isConsecutive)voidaddAnswerForVoidMethod(Answer answer)voidaddConsecutiveAnswer(Answer answer)StubbedInvocationMatcherfindAnswerFor(Invocation invocation)InvocationMatchergetInvocationForStubbing()java.util.List<Invocation>getInvocations()java.util.List<StubbedInvocationMatcher>getStubbedInvocations()booleanhasAnswersForStubbing()booleanhasInvocationForPotentialStubbing()java.lang.ObjectinvokedMock()voidresetInvocationForPotentialStubbing(InvocationMatcher invocationMatcher)voidsetAnswersForStubbing(java.util.List<Answer> answers)voidsetInvocationForPotentialStubbing(InvocationMatcher invocation)voidsetMethodForStubbing(InvocationMatcher invocation)java.lang.StringtoString()
-
-
-
Constructor Detail
-
InvocationContainerImpl
public InvocationContainerImpl(MockingProgress mockingProgress, MockCreationSettings mockSettings)
-
-
Method Detail
-
setInvocationForPotentialStubbing
public void setInvocationForPotentialStubbing(InvocationMatcher invocation)
-
resetInvocationForPotentialStubbing
public void resetInvocationForPotentialStubbing(InvocationMatcher invocationMatcher)
-
addAnswer
public void addAnswer(Answer answer)
-
addConsecutiveAnswer
public void addConsecutiveAnswer(Answer answer)
-
addAnswer
public void addAnswer(Answer answer, boolean isConsecutive)
-
findAnswerFor
public StubbedInvocationMatcher findAnswerFor(Invocation invocation)
-
addAnswerForVoidMethod
public void addAnswerForVoidMethod(Answer answer)
-
setAnswersForStubbing
public void setAnswersForStubbing(java.util.List<Answer> answers)
-
hasAnswersForStubbing
public boolean hasAnswersForStubbing()
-
hasInvocationForPotentialStubbing
public boolean hasInvocationForPotentialStubbing()
-
setMethodForStubbing
public void setMethodForStubbing(InvocationMatcher invocation)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getInvocations
public java.util.List<Invocation> getInvocations()
- Specified by:
getInvocationsin interfaceInvocationContainer
-
getStubbedInvocations
public java.util.List<StubbedInvocationMatcher> getStubbedInvocations()
- Specified by:
getStubbedInvocationsin interfaceInvocationContainer
-
invokedMock
public java.lang.Object invokedMock()
-
getInvocationForStubbing
public InvocationMatcher getInvocationForStubbing()
-
-