Class EventSourcedBehaviorTestKitImpl.CommandResultImpl<Command,Event,State,Reply>
- java.lang.Object
-
- akka.persistence.testkit.internal.EventSourcedBehaviorTestKitImpl.CommandResultImpl<Command,Event,State,Reply>
-
- All Implemented Interfaces:
EventSourcedBehaviorTestKit.CommandResult<Command,Event,State>
,EventSourcedBehaviorTestKit.CommandResultWithReply<Command,Event,State,Reply>
,java.io.Serializable
,scala.Equals
,scala.Product
- Enclosing class:
- EventSourcedBehaviorTestKitImpl<Command,Event,State>
public static final class EventSourcedBehaviorTestKitImpl.CommandResultImpl<Command,Event,State,Reply> extends java.lang.Object implements EventSourcedBehaviorTestKit.CommandResultWithReply<Command,Event,State,Reply>, scala.Product, java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CommandResultImpl(Command command, scala.collection.immutable.Seq<Event> events, State state, scala.Option<Reply> replyOption)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canEqual(java.lang.Object x$1)
Command
command()
The command that was run.<Command,Event,State,Reply>
EventSourcedBehaviorTestKitImpl.CommandResultImpl<Command,Event,State,Reply>copy(Command command, scala.collection.immutable.Seq<Event> events, State state, scala.Option<Reply> replyOption)
<Command,Event,State,Reply>
Commandcopy$default$1()
<Command,Event,State,Reply>
scala.collection.immutable.Seq<Event>copy$default$2()
<Command,Event,State,Reply>
Statecopy$default$3()
<Command,Event,State,Reply>
scala.Option<Reply>copy$default$4()
boolean
equals(java.lang.Object x$1)
Event
event()
The first event.<E extends Event>
EeventOfType(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.int
hashCode()
boolean
hasNoEvents()
true
if no events were emitted by the command.int
productArity()
java.lang.Object
productElement(int x$1)
java.lang.String
productElementName(int x$1)
scala.collection.Iterator<java.lang.Object>
productIterator()
java.lang.String
productPrefix()
Reply
reply()
The reply.<R extends Reply>
RreplyOfType(scala.reflect.ClassTag<R> evidence$3)
The reply as a given expected type.scala.Option<Reply>
replyOption()
State
state()
The state after applying the events.<S extends State>
SstateOfType(scala.reflect.ClassTag<S> evidence$2)
The state as a given expected type.java.lang.String
toString()
-
-
-
Method Detail
-
command
public Command command()
Description copied from interface:EventSourcedBehaviorTestKit.CommandResult
The command that was run.- Specified by:
command
in interfaceEventSourcedBehaviorTestKit.CommandResult<Command,Event,State>
-
events
public scala.collection.immutable.Seq<Event> events()
Description copied from interface:EventSourcedBehaviorTestKit.CommandResult
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 useCommandResult.event
orCommandResult.eventOfType
.- Specified by:
events
in interfaceEventSourcedBehaviorTestKit.CommandResult<Command,Event,State>
-
state
public State state()
Description copied from interface:EventSourcedBehaviorTestKit.CommandResult
The state after applying the events.- Specified by:
state
in interfaceEventSourcedBehaviorTestKit.CommandResult<Command,Event,State>
-
replyOption
public scala.Option<Reply> replyOption()
-
hasNoEvents
public boolean hasNoEvents()
Description copied from interface:EventSourcedBehaviorTestKit.CommandResult
true
if no events were emitted by the command.- Specified by:
hasNoEvents
in interfaceEventSourcedBehaviorTestKit.CommandResult<Command,Event,State>
-
event
public Event event()
Description copied from interface:EventSourcedBehaviorTestKit.CommandResult
The first event. It will throwAssertionError
if there is no event.- Specified by:
event
in interfaceEventSourcedBehaviorTestKit.CommandResult<Command,Event,State>
-
eventOfType
public <E extends Event> E eventOfType(scala.reflect.ClassTag<E> evidence$1)
Description copied from interface:EventSourcedBehaviorTestKit.CommandResult
The first event as a given expected type. It will throwAssertionError
if there is no event or if the event is of a different type.- Specified by:
eventOfType
in interfaceEventSourcedBehaviorTestKit.CommandResult<Command,Event,State>
-
stateOfType
public <S extends State> S stateOfType(scala.reflect.ClassTag<S> evidence$2)
Description copied from interface:EventSourcedBehaviorTestKit.CommandResult
The state as a given expected type. It will throwAssertionError
if the state is of a different type.- Specified by:
stateOfType
in interfaceEventSourcedBehaviorTestKit.CommandResult<Command,Event,State>
-
reply
public Reply reply()
Description copied from interface:EventSourcedBehaviorTestKit.CommandResultWithReply
The reply. It will throwAssertionError
if there was no reply.
-
replyOfType
public <R extends Reply> R replyOfType(scala.reflect.ClassTag<R> evidence$3)
Description copied from interface:EventSourcedBehaviorTestKit.CommandResultWithReply
The reply as a given expected type. It will throwAssertionError
if there is no reply or if the reply is of a different type.- Specified by:
replyOfType
in interfaceEventSourcedBehaviorTestKit.CommandResultWithReply<Command,Event,State,Reply>
-
copy
public <Command,Event,State,Reply> EventSourcedBehaviorTestKitImpl.CommandResultImpl<Command,Event,State,Reply> copy(Command command, scala.collection.immutable.Seq<Event> events, State state, scala.Option<Reply> replyOption)
-
copy$default$1
public <Command,Event,State,Reply> Command copy$default$1()
-
copy$default$2
public <Command,Event,State,Reply> scala.collection.immutable.Seq<Event> copy$default$2()
-
copy$default$3
public <Command,Event,State,Reply> State copy$default$3()
-
copy$default$4
public <Command,Event,State,Reply> scala.Option<Reply> copy$default$4()
-
productPrefix
public java.lang.String productPrefix()
- Specified by:
productPrefix
in interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArity
in interfacescala.Product
-
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
productElement
in interfacescala.Product
-
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
productIterator
in interfacescala.Product
-
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
canEqual
in interfacescala.Equals
-
productElementName
public java.lang.String productElementName(int x$1)
- Specified by:
productElementName
in interfacescala.Product
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Specified by:
equals
in interfacescala.Equals
- Overrides:
equals
in classjava.lang.Object
-
-