public final class MockIntegration extends Object
Modifier and Type | Method and Description |
---|---|
static org.mockito.ArgumentCaptor<Message<?>> |
messageArgumentCaptor() |
static MockMessageHandler |
mockMessageHandler()
Build a
MockMessageHandler instance. |
static MockMessageHandler |
mockMessageHandler(org.mockito.ArgumentCaptor<Message<?>> messageArgumentCaptor)
Build a
MockMessageHandler instance based on the provided ArgumentCaptor . |
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 MessageSource
MessageSource
Mockito.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 MessageSource
payloads
- the next payloads to return by mocked MessageSource
MessageSource
Mockito.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 MessageSource
MessageSource
Mockito.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 MessageSource
messages
- the next messages to return by mocked MessageSource
MessageSource
Mockito.mock(Class)
public static MockMessageHandler mockMessageHandler()
MockMessageHandler
instance.MockMessageHandler
instance ready for interactionpublic static MockMessageHandler mockMessageHandler(org.mockito.ArgumentCaptor<Message<?>> messageArgumentCaptor)
MockMessageHandler
instance based on the provided ArgumentCaptor
.messageArgumentCaptor
- the Mockito ArgumentCaptor to capture incoming messagespublic static org.mockito.ArgumentCaptor<Message<?>> messageArgumentCaptor()