Packages

trait EventSourcedBehaviorTestKit[Command, Event, State] extends AnyRef

Annotations
@ApiMayChange() @DoNotInherit()
Source
EventSourcedBehaviorTestKit.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EventSourcedBehaviorTestKit
  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. Protected

Abstract Value Members

  1. abstract def clear(): Unit

    Clears the in-memory journal and snapshot storage and restarts the behavior.

  2. abstract def getState(): State

    Retrieve the current state of the Behavior.

  3. abstract def initialize(events: Event*): Unit
  4. abstract def initialize(state: State, events: Event*): Unit

    Initializes behavior from provided state and/or events.

  5. abstract def persistenceTestKit: PersistenceTestKit

    The underlying PersistenceTestKit for the in-memory journal.

    The underlying PersistenceTestKit for the in-memory journal. Can be useful for advanced testing scenarios, such as simulating failures or populating the journal with events that are used for replay.

  6. abstract def restart(): RestartResult[State]

    Restart the behavior, which will then recover from stored snapshot and events.

    Restart the behavior, which will then recover from stored snapshot and events. Can be used for testing that the recovery is correct.

  7. abstract def runCommand[R](creator: (ActorRef[R]) => Command): CommandResultWithReply[Command, Event, State, R]

    Run one command with a replyTo: ActorRef[R] through the behavior.

    Run one command with a replyTo: ActorRef[R] through the behavior. The returned result contains emitted events, the state after applying the events, and the reply.

  8. abstract def runCommand(command: Command): CommandResult[Command, Event, State]

    Run one command through the behavior.

    Run one command through the behavior. The returned result contains emitted events and the state after applying the events.

  9. abstract def snapshotTestKit: Option[SnapshotTestKit]

    The underlying SnapshotTestKit for snapshot storage.

    The underlying SnapshotTestKit for snapshot storage. Present only if snapshots are enabled. Can be useful for advanced testing scenarios, such as simulating failures or populating the storage with snapshots that are used for replay.