akka.persistence.testkit.javadsl
EventSourcedBehaviorTestKit
Companion class EventSourcedBehaviorTestKit
object EventSourcedBehaviorTestKit
Testing of akka.persistence.typed.javadsl.EventSourcedBehavior implementations. It supports running one command at a time and you can assert that the synchronously returned result is as expected. The result contains the events emitted by the command and the new state after applying the events. It also has support for verifying the reply to a command.
Serialization of commands, events and state are verified automatically.
- Annotations
- @ApiMayChange()
- Source
- EventSourcedBehaviorTestKit.scala
- Alphabetic
- By Inheritance
- EventSourcedBehaviorTestKit
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class CommandResult[Command, Event, State] extends AnyRef
The result of running a command.
The result of running a command.
- Annotations
- @DoNotInherit()
- final class CommandResultWithReply[Command, Event, State, Reply] extends CommandResult[Command, Event, State]
The result of running a command with a
ActorRef<R> replyTo
, i.e.The result of running a command with a
ActorRef<R> replyTo
, i.e. therunCommand
with aFunction<ActorRef<R>, Command>
parameter. - final class RestartResult[State] extends AnyRef
The result of restarting the behavior.
- final class SerializationSettings extends AnyRef
Customization of which serialization checks that are performed.
Customization of which serialization checks that are performed.
equals
must be implemented (or usingcase class
) whenverifyEquality
is enabled.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- val config: Config
The configuration to be included in the configuration of the
ActorSystem
.The configuration to be included in the configuration of the
ActorSystem
. Typically used as constructor parameter toTestKitJunitResource
. The configuration enables the in-memory journal and snapshot storage. - def create[Command, Event, State](system: ActorSystem[_], behavior: Behavior[Command], serializationSettings: SerializationSettings): EventSourcedBehaviorTestKit[Command, Event, State]
Factory method to create a new EventSourcedBehaviorTestKit with custom SerializationSettings.
Factory method to create a new EventSourcedBehaviorTestKit with custom SerializationSettings.
Note that
equals
must be implemented in the commands, events and state ifverifyEquality
is enabled. - def create[Command, Event, State](system: ActorSystem[_], behavior: Behavior[Command]): EventSourcedBehaviorTestKit[Command, Event, State]
Factory method to create a new EventSourcedBehaviorTestKit.
- val disabledSerializationSettings: SerializationSettings
- val enabledSerializationSettings: SerializationSettings
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])