Package org.mockito.stubbing
package org.mockito.stubbing
Stubbing related classes.
-
ClassDescriptionAnswer<T>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 withMockito.doReturn(Object)
syntax.Used for declaring optional stubbings withMockito.lenient()
Simply put: "When the x method is called then return y".Allows to choose a method when stubbing in doThrow()|doAnswer()|doNothing()|doReturn() styleStubbing declared on the mock object.Allow to validate this answer is correct for the given invocation.VoidAnswer1<A0>Generic interface to be used for configuring mock's answer for a single argument invocation that returns nothing.VoidAnswer2<A0,A1> 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.