Class/Object

com.lightbend.lagom.scaladsl.testkit

PersistentEntityTestDriver

Related Docs: object PersistentEntityTestDriver | package testkit

Permalink

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
AnyRef, Any
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)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    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)

    Permalink
    Implicit information
    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

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def ensuring(cond: (PersistentEntityTestDriver[C, E, S]) ⇒ Boolean, msg: ⇒ Any): PersistentEntityTestDriver[C, E, S]

    Permalink
    Implicit information
    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]

    Permalink
    Implicit information
    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]

    Permalink
    Implicit information
    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]

    Permalink
    Implicit information
    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 */ }

    Permalink
  13. val entityId: String

    Permalink
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    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]

    Permalink

    Accumulated issues from all previous runs.

  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. def initialize(snapshotState: Option[S], events: E*): Outcome[E, S]

    Permalink

    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

    Permalink
    Definition Classes
    Any
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def run(commands: C*): Outcome[E, S]

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  28. val system: ActorSystem

    Permalink
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. def [B](y: B): (PersistentEntityTestDriver[C, E, S], B)

    Permalink
    Implicit information
    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