T - the return type of the answerpublic final class FluentAnswer<T extends org.camunda.bpm.engine.query.Query<?,R>,R> 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 extends org.camunda.bpm.engine.query.Query<?,R>,R> |
createAnswer(Class<T> type)
Creates a new instance for the given type.
|
static <T extends org.camunda.bpm.engine.query.Query<?,R>,R> |
createMock(Class<T> type)
Creates a new mock of given type with a fluent default answer already set
up.
|
public static <T extends org.camunda.bpm.engine.query.Query<?,R>,R> T createMock(Class<T> type)
T - generic parameter for type of mocktype - type of mockpublic static <T extends org.camunda.bpm.engine.query.Query<?,R>,R> FluentAnswer<T,R> createAnswer(Class<T> type)
T - generic parameter of the return typetype - the return type of the answerpublic T answer(@Nonnull org.mockito.invocation.InvocationOnMock invocation) throws Throwable
answer in interface org.mockito.stubbing.Answer<T extends org.camunda.bpm.engine.query.Query<?,R>>invocation - the method invocation. If its return type equals the mock type,
just return the mock.Throwable - when anything failsCopyright © 2020 Camunda Services GmbH. All rights reserved.