public class LambdaAnswer<T> extends Object implements org.mockito.stubbing.Answer<T>
Answer to optionally call the real method and allow returning a
custom result. Captures any exceptions thrown.| Modifier and Type | Class and Description |
|---|---|
static interface |
LambdaAnswer.ValueToReturn<T> |
| Constructor and Description |
|---|
LambdaAnswer(boolean callRealMethod,
LambdaAnswer.ValueToReturn<T> callback) |
| Modifier and Type | Method and Description |
|---|---|
T |
answer(org.mockito.invocation.InvocationOnMock invocation) |
Collection<Exception> |
getExceptions()
Return the exceptions thrown, if any.
|
public LambdaAnswer(boolean callRealMethod,
LambdaAnswer.ValueToReturn<T> callback)
public Collection<Exception> getExceptions()