public class DoesNothing extends java.lang.Object implements Answer<java.lang.Object>, ValidableAnswer, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
private static DoesNothing |
SINGLETON |
Modifier | Constructor and Description |
---|---|
private |
DoesNothing() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
answer(InvocationOnMock invocation) |
static DoesNothing |
doesNothing() |
void |
validateFor(InvocationOnMock invocation)
Validation of the answer at stub time for the given invocation.
|
private static final long serialVersionUID
private static final DoesNothing SINGLETON
public static DoesNothing doesNothing()
public java.lang.Object answer(InvocationOnMock invocation)
public void validateFor(InvocationOnMock invocation)
ValidableAnswer
This method will be called by Mockito.
The implementation must throw an MockitoException to indicate that this answer is not valid for the given invocation. If the validation succeed the implementation must simply return without throwing.
validateFor
in interface ValidableAnswer
invocation
- The stubbed invocation