T - the return type.public class LambdaAnswer<T>
extends org.mockito.internal.stubbing.defaultanswers.ForwardsInvocations
| Modifier and Type | Class and Description |
|---|---|
static interface |
LambdaAnswer.ValueToReturn<T> |
| Constructor and Description |
|---|
LambdaAnswer(boolean callRealMethod,
LambdaAnswer.ValueToReturn<T> callback)
Deprecated.
in favor of
LambdaAnswer(boolean, ValueToReturn, Object). |
LambdaAnswer(boolean callRealMethod,
LambdaAnswer.ValueToReturn<T> callback,
java.lang.Object delegate)
Construct an instance with the provided properties.
|
| Modifier and Type | Method and Description |
|---|---|
T |
answer(org.mockito.invocation.InvocationOnMock invocation) |
@Deprecated
public LambdaAnswer(boolean callRealMethod,
LambdaAnswer.ValueToReturn<T> callback)
LambdaAnswer(boolean, ValueToReturn, Object).callRealMethod - true to call the real method.callback - the callback.public LambdaAnswer(boolean callRealMethod,
LambdaAnswer.ValueToReturn<T> callback,
@Nullable
java.lang.Object delegate)
callRealMethod - true to call the real method.callback - the call back to receive the result.delegate - the delegate.public T answer(org.mockito.invocation.InvocationOnMock invocation) throws java.lang.Throwable
answer in interface org.mockito.stubbing.Answer<java.lang.Object>answer in class org.mockito.internal.stubbing.defaultanswers.ForwardsInvocationsjava.lang.Throwable