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 void
addAnswer(Answer answer)
void
addAnswer(Answer answer, boolean isConsecutive)
void
addAnswerForVoidMethod(Answer answer)
void
addConsecutiveAnswer(Answer answer)
StubbedInvocationMatcher
findAnswerFor(Invocation invocation)
InvocationMatcher
getInvocationForStubbing()
java.util.List<Invocation>
getInvocations()
java.util.List<StubbedInvocationMatcher>
getStubbedInvocations()
boolean
hasAnswersForStubbing()
boolean
hasInvocationForPotentialStubbing()
java.lang.Object
invokedMock()
void
resetInvocationForPotentialStubbing(InvocationMatcher invocationMatcher)
void
setAnswersForStubbing(java.util.List<Answer> answers)
void
setInvocationForPotentialStubbing(InvocationMatcher invocation)
void
setMethodForStubbing(InvocationMatcher invocation)
java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
getInvocations
public java.util.List<Invocation> getInvocations()
- Specified by:
getInvocations
in interfaceInvocationContainer
-
getStubbedInvocations
public java.util.List<StubbedInvocationMatcher> getStubbedInvocations()
- Specified by:
getStubbedInvocations
in interfaceInvocationContainer
-
invokedMock
public java.lang.Object invokedMock()
-
getInvocationForStubbing
public InvocationMatcher getInvocationForStubbing()
-
-