Class InvocationContainerImpl

java.lang.Object
org.mockito.internal.stubbing.InvocationContainerImpl
All Implemented Interfaces:
Serializable, InvocationContainer

public class InvocationContainerImpl extends Object implements InvocationContainer, Serializable
See Also:
  • Constructor Details

  • Method Details

    • setInvocationForPotentialStubbing

      public void setInvocationForPotentialStubbing(MatchableInvocation invocation)
    • resetInvocationForPotentialStubbing

      public void resetInvocationForPotentialStubbing(MatchableInvocation invocationMatcher)
    • addAnswer

      public void addAnswer(Answer<?> answer, Strictness stubbingStrictness)
    • 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

      public void addConsecutiveAnswer(Answer<?> answer)
    • findAnswerFor

      public StubbedInvocationMatcher findAnswerFor(Invocation invocation)
    • setAnswersForStubbing

      public void setAnswersForStubbing(List<Answer<?>> answers, Strictness strictness)
      Sets the answers declared with 'doAnswer' style.
    • hasAnswersForStubbing

      public boolean hasAnswersForStubbing()
    • hasInvocationForPotentialStubbing

      public boolean hasInvocationForPotentialStubbing()
    • setMethodForStubbing

      public void setMethodForStubbing(MatchableInvocation invocation)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getInvocations

      public List<Invocation> getInvocations()
    • clearInvocations

      public void clearInvocations()
    • getStubbingsAscending

      public Collection<Stubbing> getStubbingsAscending()
      Stubbings in ascending order, most recent last
    • invokedMock

      public Object invokedMock()
    • findStubbedAnswer

      public Answer<?> findStubbedAnswer()