public final class MockIntegration extends Object
| Modifier and Type | Method and Description |
|---|---|
static MessageSource<?> |
mockMessageSource(Message<?> message)
Build a mock for the
MessageSource based on the provided message. |
static MessageSource<?> |
mockMessageSource(Message<?> message,
Message<?>... messages)
Build a mock for the
MessageSource based on the provided messages. |
static <T> MessageSource<T> |
mockMessageSource(T payload)
Build a mock for the
MessageSource based on the provided payload. |
static <T> MessageSource<T> |
mockMessageSource(T payload,
T... payloads)
Build a mock for the
MessageSource based on the provided payloads. |
public static <T> MessageSource<T> mockMessageSource(T payload)
MessageSource based on the provided payload.
The returned instance is ordinary Mockito mock that is capable of
recording interactions with it and further verification.T - the payload typepayload - the payload to return by mocked MessageSourceMessageSourceMockito.mock(Class)public static <T> MessageSource<T> mockMessageSource(T payload, T... payloads)
MessageSource based on the provided payloads.
The returned instance is ordinary Mockito mock that is capable of
recording interactions with it and further verification.T - the payload typepayload - the first payload to return by mocked MessageSourcepayloads - the next payloads to return by mocked MessageSourceMessageSourceMockito.mock(Class)public static MessageSource<?> mockMessageSource(Message<?> message)
MessageSource based on the provided message.
The returned instance is ordinary Mockito mock that is capable of
recording interactions with it and further verification.message - the message to return by mocked MessageSourceMessageSourceMockito.mock(Class)public static MessageSource<?> mockMessageSource(Message<?> message, Message<?>... messages)
MessageSource based on the provided messages.
The returned instance is ordinary Mockito mock that is capable of
recording interactions with it and further verification.message - the first message to return by mocked MessageSourcemessages - the next messages to return by mocked MessageSourceMessageSourceMockito.mock(Class)