Packages

class PersistentEntityTestDriver[C, E, S] extends AnyRef

A testing utility for verifying that a com.lightbend.lagom.scaladsl.persistence.PersistentEntity emits expected events and side-effects in response to incoming commands.

It also verifies that all commands, events, replies and state are serializable, and reports any such problems in the issues of the Outcome.

Source
PersistentEntityTestDriver.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PersistentEntityTestDriver
  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 PersistentEntityTestDriver(system: ActorSystem, entity: PersistentEntity { ... /* 3 definitions in type refinement */ }, entityId: String)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from PersistentEntityTestDriver[C, E, S] to any2stringadd[PersistentEntityTestDriver[C, E, S]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (PersistentEntityTestDriver[C, E, S], B)
    Implicit
    This member is added by an implicit conversion from PersistentEntityTestDriver[C, E, S] to ArrowAssoc[PersistentEntityTestDriver[C, E, S]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. def ensuring(cond: (PersistentEntityTestDriver[C, E, S]) ⇒ Boolean, msg: ⇒ Any): PersistentEntityTestDriver[C, E, S]
    Implicit
    This member is added by an implicit conversion from PersistentEntityTestDriver[C, E, S] to Ensuring[PersistentEntityTestDriver[C, E, S]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (PersistentEntityTestDriver[C, E, S]) ⇒ Boolean): PersistentEntityTestDriver[C, E, S]
    Implicit
    This member is added by an implicit conversion from PersistentEntityTestDriver[C, E, S] to Ensuring[PersistentEntityTestDriver[C, E, S]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): PersistentEntityTestDriver[C, E, S]
    Implicit
    This member is added by an implicit conversion from PersistentEntityTestDriver[C, E, S] to Ensuring[PersistentEntityTestDriver[C, E, S]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): PersistentEntityTestDriver[C, E, S]
    Implicit
    This member is added by an implicit conversion from PersistentEntityTestDriver[C, E, S] to Ensuring[PersistentEntityTestDriver[C, E, S]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. val entity: PersistentEntity { ... /* 3 definitions in type refinement */ }
  13. val entityId: String
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from PersistentEntityTestDriver[C, E, S] to StringFormat[PersistentEntityTestDriver[C, E, S]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  18. def getAllIssues: Seq[Issue]

    Accumulated issues from all previous runs.

  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def initialize(snapshotState: Option[S], events: E*): Outcome[E, S]

    Initialize the entity.

    Initialize the entity.

    This can be used to simulate the startup of an entity, be passing some snapshot state, and then some additional events that weren't included in that entity.

    The returned outcome contains the state with events applied to it and any issues with the state and events.

    This method may not be invoked twice, and it also must not be invoked after passing commands to the run method, since that will automatically initialize the entity with an empty snapshot if not yet initialized.

    snapshotState

    The state to initialize the entity with.

    events

    The additional events to run before invoking recoveryCompleted

    returns

    The outcome.

  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. def run(commands: C*): Outcome[E, S]

    The entity will process the commands and the emitted events and side effects are recorded and provided in the returned Outcome.

    The entity will process the commands and the emitted events and side effects are recorded and provided in the returned Outcome. Current state is also included in the Outcome.

    run may be invoked multiple times to divide the sequence of commands into manageable steps. The Outcome contains the events and side-effects of the last run, but the state is not reset between different runs.

  27. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  28. val system: ActorSystem
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  33. def [B](y: B): (PersistentEntityTestDriver[C, E, S], B)
    Implicit
    This member is added by an implicit conversion from PersistentEntityTestDriver[C, E, S] to ArrowAssoc[PersistentEntityTestDriver[C, E, S]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from PersistentEntityTestDriver[C, E, S] to any2stringadd[PersistentEntityTestDriver[C, E, S]]

Inherited by implicit conversion StringFormat from PersistentEntityTestDriver[C, E, S] to StringFormat[PersistentEntityTestDriver[C, E, S]]

Inherited by implicit conversion Ensuring from PersistentEntityTestDriver[C, E, S] to Ensuring[PersistentEntityTestDriver[C, E, S]]

Inherited by implicit conversion ArrowAssoc from PersistentEntityTestDriver[C, E, S] to ArrowAssoc[PersistentEntityTestDriver[C, E, S]]

Ungrouped