Package org.mockito.stubbing


package org.mockito.stubbing
Stubbing related classes.
  • Interfaces
    Class
    Description
    Generic interface to be used for configuring mock's answer.
    Answer1<T,A0>
    Generic interface to be used for configuring mock's answer for a single argument invocation.
    Answer2<T,A0,A1>
    Generic interface to be used for configuring mock's answer for a two argument invocation.
    Answer3<T,A0,A1,A2>
    Generic interface to be used for configuring mock's answer for a three argument invocation.
    Answer4<T,A0,A1,A2,A3>
    Generic interface to be used for configuring mock's answer for a four argument invocation.
    Answer5<T,A0,A1,A2,A3,A4>
    Generic interface to be used for configuring mock's answer for a five argument invocation.
    Answer6<T,A0,A1,A2,A3,A4,A5>
    Generic interface to be used for configuring mock's answer for a six argument invocation.
    Base interface for stubbing consecutive method calls with Mockito.doReturn(Object) syntax.
    Used for declaring optional stubbings with Mockito.lenient()
    Simply put: "When the x method is called then return y".
    Allows to choose a method when stubbing in doThrow()|doAnswer()|doNothing()|doReturn() style
    Stubbing declared on the mock object.
    Allow to validate this answer is correct for the given invocation.
    Generic interface to be used for configuring mock's answer for a single argument invocation that returns nothing.
    Generic interface to be used for configuring mock's answer for a two argument invocation that returns nothing.
    VoidAnswer3<A0,A1,A2>
    Generic interface to be used for configuring mock's answer for a three argument invocation that returns nothing.
    VoidAnswer4<A0,A1,A2,A3>
    Generic interface to be used for configuring mock's answer for a four argument invocation that returns nothing.
    VoidAnswer5<A0,A1,A2,A3,A4>
    Generic interface to be used for configuring mock's answer for a five argument invocation that returns nothing.
    VoidAnswer6<A0,A1,A2,A3,A4,A5>
    Generic interface to be used for configuring mock's answer for a six argument invocation that returns nothing.