public class InvocationContainerImpl extends java.lang.Object implements InvocationContainer, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private DoAnswerStyleStubbing |
doAnswerStyleStubbing |
private MatchableInvocation |
invocationForStubbing |
private Strictness |
mockStrictness |
private RegisteredInvocations |
registeredInvocations |
private static long |
serialVersionUID |
private java.util.LinkedList<StubbedInvocationMatcher> |
stubbed |
Constructor and Description |
---|
InvocationContainerImpl(MockCreationSettings mockSettings) |
Modifier and Type | Method and Description |
---|---|
StubbedInvocationMatcher |
addAnswer(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) java.lang.Object |
answerTo(Invocation invocation) |
void |
clearInvocations() |
private RegisteredInvocations |
createRegisteredInvocations(MockCreationSettings mockSettings) |
StubbedInvocationMatcher |
findAnswerFor(Invocation invocation) |
MatchableInvocation |
getInvocationForStubbing() |
java.util.List<Invocation> |
getInvocations() |
java.util.Collection<Stubbing> |
getStubbingsAscending()
Stubbings in ascending order, most recent last
|
java.util.List<Stubbing> |
getStubbingsDescending()
Stubbings in descending order, most recent first
|
boolean |
hasAnswersForStubbing() |
boolean |
hasInvocationForPotentialStubbing() |
java.lang.Object |
invokedMock() |
void |
resetInvocationForPotentialStubbing(MatchableInvocation invocationMatcher) |
void |
setAnswersForStubbing(java.util.List<Answer<?>> answers,
Strictness strictness)
Sets the answers declared with 'doAnswer' style.
|
void |
setInvocationForPotentialStubbing(MatchableInvocation invocation) |
void |
setMethodForStubbing(MatchableInvocation invocation) |
java.lang.String |
toString() |
private static final long serialVersionUID
private final java.util.LinkedList<StubbedInvocationMatcher> stubbed
private final DoAnswerStyleStubbing doAnswerStyleStubbing
private final RegisteredInvocations registeredInvocations
private final Strictness mockStrictness
private MatchableInvocation invocationForStubbing
public InvocationContainerImpl(MockCreationSettings mockSettings)
public void setInvocationForPotentialStubbing(MatchableInvocation invocation)
public void resetInvocationForPotentialStubbing(MatchableInvocation invocationMatcher)
public void addAnswer(Answer answer, Strictness stubbingStrictness)
public void addConsecutiveAnswer(Answer answer)
public StubbedInvocationMatcher addAnswer(Answer answer, boolean isConsecutive, Strictness stubbingStrictness)
java.lang.Object answerTo(Invocation invocation) throws java.lang.Throwable
java.lang.Throwable
public StubbedInvocationMatcher findAnswerFor(Invocation invocation)
public void setAnswersForStubbing(java.util.List<Answer<?>> answers, Strictness strictness)
public boolean hasAnswersForStubbing()
public boolean hasInvocationForPotentialStubbing()
public void setMethodForStubbing(MatchableInvocation invocation)
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<Invocation> getInvocations()
public void clearInvocations()
public java.util.List<Stubbing> getStubbingsDescending()
public java.util.Collection<Stubbing> getStubbingsAscending()
public java.lang.Object invokedMock()
public MatchableInvocation getInvocationForStubbing()
private RegisteredInvocations createRegisteredInvocations(MockCreationSettings mockSettings)