Interface TestInbox<T>
-
public interface TestInbox<T>
Utility for use as anActorRef
when *synchronously* testingBehavior
withBehaviorTestKit
.If you plan to use a real
ActorSystem
then useTestProbe
for asynchronous testing.Use factory
apply
in companion to create instancesNot for user extension
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TestInbox<T>
expectMessage(T expectedMessage)
Assert and remove the the oldest message.boolean
hasMessages()
scala.collection.immutable.Seq<T>
internalReceiveAll()
scala.collection.immutable.Seq<T>
receiveAll()
Collect all messages in the inbox and clear it outT
receiveMessage()
Get and remove the oldest messageActorRef<T>
ref()
The actor ref of the inbox
-
-
-
Method Detail
-
receiveMessage
T receiveMessage()
Get and remove the oldest message
-
expectMessage
TestInbox<T> expectMessage(T expectedMessage)
Assert and remove the the oldest message.
-
receiveAll
scala.collection.immutable.Seq<T> receiveAll()
Collect all messages in the inbox and clear it out
-
internalReceiveAll
scala.collection.immutable.Seq<T> internalReceiveAll()
-
hasMessages
boolean hasMessages()
-
-