CommandResult

org.apache.pekko.persistence.testkit.scaladsl.EventSourcedBehaviorTestKit.CommandResult
@DoNotInherit
trait CommandResult[Command, Event, State]

The result of running a command.

Attributes

Source
EventSourcedBehaviorTestKit.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait CommandResultWithReply[Command, Event, State, Reply]

Members list

Value members

Abstract methods

def command: Command

The command that was run.

The command that was run.

Attributes

Source
EventSourcedBehaviorTestKit.scala
def event: Event

The first event. It will throw AssertionError if there is no event.

The first event. It will throw AssertionError if there is no event.

Attributes

Source
EventSourcedBehaviorTestKit.scala
def eventOfType[E <: Event : ClassTag]: E

The first event as a given expected type. It will throw AssertionError if there is no event or if the event is of a different type.

The first event as a given expected type. It will throw AssertionError if there is no event or if the event is of a different type.

Attributes

Source
EventSourcedBehaviorTestKit.scala
def events: Seq[Event]

The events that were emitted by the command, and persisted. In many cases only one event is emitted and then it's more convenient to use CommandResult.event or CommandResult.eventOfType.

The events that were emitted by the command, and persisted. In many cases only one event is emitted and then it's more convenient to use CommandResult.event or CommandResult.eventOfType.

Attributes

Source
EventSourcedBehaviorTestKit.scala

true if no events were emitted by the command.

true if no events were emitted by the command.

Attributes

Source
EventSourcedBehaviorTestKit.scala
def state: State

The state after applying the events.

The state after applying the events.

Attributes

Source
EventSourcedBehaviorTestKit.scala
def stateOfType[S <: State : ClassTag]: S

The state as a given expected type. It will throw AssertionError if the state is of a different type.

The state as a given expected type. It will throw AssertionError if the state is of a different type.

Attributes

Source
EventSourcedBehaviorTestKit.scala