Packages

trait 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 factory apply in companion 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

Abstract Value Members

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

    Assert and remove the the oldest message.

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

    Get and remove the oldest message

  4. abstract def ref: typed.ActorRef[T]

    The actor ref of the inbox

Concrete Value Members

  1. def receiveAll(): Seq[T]

    Collect all messages in the inbox and clear it out