Interface EventSourcedBehaviorTestKit.CommandResult<Command,​Event,​State>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Command command()
      The command that was run.
      Event event()
      The first event.
      <E extends Event>
      E
      eventOfType​(scala.reflect.ClassTag<E> evidence$1)
      The first event as a given expected type.
      scala.collection.immutable.Seq<Event> events()
      The events that were emitted by the command, and persisted.
      boolean hasNoEvents()
      true if no events were emitted by the command.
      State state()
      The state after applying the events.
      <S extends State>
      S
      stateOfType​(scala.reflect.ClassTag<S> evidence$2)
      The state as a given expected type.
    • Method Detail

      • command

        Command command()
        The command that was run.
      • event

        Event event()
        The first event. It will throw AssertionError if there is no event.
      • eventOfType

        <E extends Event> E eventOfType​(scala.reflect.ClassTag<E> evidence$1)
        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.
      • events

        scala.collection.immutable.Seq<Event> events()
        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.
      • hasNoEvents

        boolean hasNoEvents()
        true if no events were emitted by the command.
      • state

        State state()
        The state after applying the events.
      • stateOfType

        <S extends State> S stateOfType​(scala.reflect.ClassTag<S> evidence$2)
        The state as a given expected type. It will throw AssertionError if the state is of a different type.