Packages

abstract class TestInbox[T] extends AnyRef

Utility for use as an ActorRef when *synchronously* testing akka.actor.typed.Behavior with akka.actor.testkit.typed.javadsl.BehaviorTestKit.

If you plan to use a real akka.actor.typed.ActorSystem then use akka.actor.testkit.typed.javadsl.TestProbe for asynchronous testing.

Use TestInbox.create factory methods to create instances

Not for user extension

Annotations
@DoNotInherit()
Source
TestInbox.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TestInbox
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TestInbox()

Abstract Value Members

  1. abstract def expectMessage(expectedMessage: T): TestInbox[T]

    Assert and remove the the oldest message.

  2. abstract def getRef(): typed.ActorRef[T]

    The actor ref of the inbox

  3. abstract def hasMessages: Boolean
  4. abstract def receiveMessage(): T

    Get and remove the oldest message

Concrete Value Members

  1. def getAllReceived(): List[T]

    Collect all messages in the inbox and clear it out