public interface WSProbe
Flow[Message, Message, Unit]
for testing
websocket code.
Requesting elements is handled automatically.
Modifier and Type | Method and Description |
---|---|
void |
expectCompletion()
Expect completion on the input side of the flow.
|
Message |
expectMessage()
Expect a message on the input side of the flow.
|
void |
expectMessage(org.apache.pekko.util.ByteString bytes)
Expect a binary message on the input side of the flow and compares its payload with the given one.
|
void |
expectMessage(java.lang.String text)
Expect a text message on the input side of the flow and compares its payload with the given one.
|
void |
expectNoMessage()
Expect no message on the input side of the flow.
|
void |
expectNoMessage(scala.concurrent.duration.FiniteDuration max)
Expect no message on the input side of the flow for the given maximum duration.
|
org.apache.pekko.stream.scaladsl.Flow<Message,Message,org.apache.pekko.NotUsed> |
flow() |
org.apache.pekko.stream.testkit.TestSubscriber.Probe<Message> |
inProbe()
The underlying probe for the ingoing side of this probe.
|
org.apache.pekko.stream.testkit.TestPublisher.Probe<Message> |
outProbe()
The underlying probe for the outgoing side of this probe.
|
void |
sendCompletion()
Complete the output side of the flow.
|
void |
sendMessage(org.apache.pekko.util.ByteString bytes)
Send a binary message containing the given bytes out of the flow.
|
void |
sendMessage(Message message)
Send the given messages out of the flow.
|
void |
sendMessage(java.lang.String text)
Send a text message containing the given string out of the flow.
|
void sendMessage(Message message)
message
- (undocumented)void sendMessage(java.lang.String text)
text
- (undocumented)void sendMessage(org.apache.pekko.util.ByteString bytes)
bytes
- (undocumented)void sendCompletion()
Message expectMessage()
void expectMessage(java.lang.String text)
text
- (undocumented)void expectMessage(org.apache.pekko.util.ByteString bytes)
bytes
- (undocumented)void expectNoMessage()
void expectNoMessage(scala.concurrent.duration.FiniteDuration max)
max
- (undocumented)void expectCompletion()
org.apache.pekko.stream.testkit.TestSubscriber.Probe<Message> inProbe()
org.apache.pekko.stream.testkit.TestPublisher.Probe<Message> outProbe()