java.lang.Object
io.helidon.messaging.connectors.mock.MockIncoming<P>
- Type Parameters:
P
- type of the payload
Mock-able incoming channel connected to the mock connector.
-
Method Summary
Modifier and TypeMethodDescriptionawaitCancelled
(Duration timeout) Wait and block till the stream is in terminal state and asserts if the terminal state is caused by cancel signal.complete()
Send terminal complete signal to the channel.final MockIncoming<P>
Emit one or more messages directly to the mocked channel.final MockIncoming<P>
Emit one or more payloads directly to the mocked channel.Send terminal error signal to the channel.
-
Method Details
-
emit
Emit one or more payloads directly to the mocked channel.- Parameters:
payload
- one or more payloads to send down the stream- Returns:
- this channel mocker
-
emit
Emit one or more messages directly to the mocked channel.- Parameters:
message
- one or more messages to send down the stream- Returns:
- this channel mocker
-
complete
Send terminal complete signal to the channel.- Returns:
- this channel mocker
-
fail
Send terminal error signal to the channel.- Parameters:
t
- cause of the channel termination- Returns:
- this channel mocker
-
awaitCancelled
Wait and block till the stream is in terminal state and asserts if the terminal state is caused by cancel signal.- Parameters:
timeout
- Timeout for waiting on the stream being cancelled.- Returns:
- this mock
-