T - the return type of the answerpublic final class FluentAnswer<T> extends Object implements org.mockito.stubbing.Answer<T>
| Modifier and Type | Method and Description |
|---|---|
T |
answer(org.mockito.invocation.InvocationOnMock invocation)
Returns the mock itself if return type and mock type match (assume fluent
api).
|
static <T> FluentAnswer<T> |
createAnswer(Class<T> type)
Creates a new instance for the given type.
|
static <T> T |
createMock(Class<T> type)
Creates a new mock of given type with a fluent default answer already set
up.
|
public static <T> T createMock(Class<T> type)
T - generic parameter for type of mocktype - type of mockpublic static <T> FluentAnswer<T> createAnswer(Class<T> type)
T - generic parameter of the return typetype - the return type of the answerCopyright © 2017 camunda services GmbH. All rights reserved.