Interface WSProbe
public interface WSProbe
A WSProbe is a probe that implements a 
Flow[Message, Message, Unit] for testing
 websocket code.
 Requesting elements is handled automatically.
- 
Method SummaryModifier and TypeMethodDescriptionvoidExpect completion on the input side of the flow.Expect a message on the input side of the flow.voidexpectMessage(String text) Expect a text message on the input side of the flow and compares its payload with the given one.voidexpectMessage(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.voidExpect no message on the input side of the flow.voidexpectNoMessage(scala.concurrent.duration.FiniteDuration max) Expect no message on the input side of the flow for the given maximum duration.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.voidComplete the output side of the flow.voidsendMessage(String text) Send a text message containing the given string out of the flow.voidsendMessage(Message message) Send the given messages out of the flow.voidsendMessage(org.apache.pekko.util.ByteString bytes) Send a binary message containing the given bytes out of the flow.
- 
Method Details- 
flow
- 
sendMessageSend the given messages out of the flow.- Parameters:
- message- (undocumented)
 
- 
sendMessageSend a text message containing the given string out of the flow.- Parameters:
- text- (undocumented)
 
- 
sendMessagevoid sendMessage(org.apache.pekko.util.ByteString bytes) Send a binary message containing the given bytes out of the flow.- Parameters:
- bytes- (undocumented)
 
- 
sendCompletionvoid sendCompletion()Complete the output side of the flow.
- 
expectMessageMessage expectMessage()Expect a message on the input side of the flow.- Returns:
- (undocumented)
 
- 
expectMessageExpect a text message on the input side of the flow and compares its payload with the given one. If the received message is streamed its contents are collected and then asserted against the given String.- Parameters:
- text- (undocumented)
 
- 
expectMessagevoid 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. If the received message is streamed its contents are collected and then asserted against the given ByteString.- Parameters:
- bytes- (undocumented)
 
- 
expectNoMessagevoid expectNoMessage()Expect no message on the input side of the flow.
- 
expectNoMessagevoid expectNoMessage(scala.concurrent.duration.FiniteDuration max) Expect no message on the input side of the flow for the given maximum duration.- Parameters:
- max- (undocumented)
 
- 
expectCompletionvoid expectCompletion()Expect completion on the input side of the flow.
- 
inProbeorg.apache.pekko.stream.testkit.TestSubscriber.Probe<Message> inProbe()The underlying probe for the ingoing side of this probe. Can be used if the methods on WSProbe don't allow fine enough control over the message flow.- Returns:
- (undocumented)
 
- 
outProbeorg.apache.pekko.stream.testkit.TestPublisher.Probe<Message> outProbe()The underlying probe for the outgoing side of this probe. Can be used if the methods on WSProbe don't allow fine enough control over the message flow.- Returns:
- (undocumented)
 
 
-