public final class MockIntegration
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static org.mockito.ArgumentCaptor<org.springframework.messaging.Message<?>> |
messageArgumentCaptor() |
static MockMessageHandler |
mockMessageHandler()
Build a
MockMessageHandler instance. |
static MockMessageHandler |
mockMessageHandler(org.mockito.ArgumentCaptor<org.springframework.messaging.Message<?>> messageArgumentCaptor)
Build a
MockMessageHandler instance based on the provided ArgumentCaptor. |
static MessageSource<?> |
mockMessageSource(org.springframework.messaging.Message<?> message)
Build a mock for the
MessageSource based on the provided message. |
static MessageSource<?> |
mockMessageSource(org.springframework.messaging.Message<?> message,
org.springframework.messaging.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(org.springframework.messaging.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(org.springframework.messaging.Message<?> message, org.springframework.messaging.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)public static MockMessageHandler mockMessageHandler()
MockMessageHandler instance.MockMessageHandler instance ready for interactionpublic static MockMessageHandler mockMessageHandler(org.mockito.ArgumentCaptor<org.springframework.messaging.Message<?>> messageArgumentCaptor)
MockMessageHandler instance based on the provided ArgumentCaptor.messageArgumentCaptor - the Mockito ArgumentCaptor to capture incoming messagespublic static org.mockito.ArgumentCaptor<org.springframework.messaging.Message<?>> messageArgumentCaptor()