org.apache.pekko.persistence.testkit.scaladsl
DurableStateBehaviorTestKit
Companion trait DurableStateBehaviorTestKit
object DurableStateBehaviorTestKit
Testing of pekko.persistence.typed.state.scaladsl.DurableStateBehavior implementations. It supports running one command at a time and asserting that the synchronously returned result is as expected. The result contains the new state after the command has been processed. It also has support for verifying the reply to a command.
Serialization of commands and state is verified automatically.
- Annotations
- @ApiMayChange()
- Source
- DurableStateBehaviorTestKit.scala
- Since
2.0.0
- Alphabetic
- By Inheritance
- DurableStateBehaviorTestKit
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait CommandResult[Command, State] extends AnyRef
The result of running a command.
The result of running a command.
- Annotations
- @DoNotInherit()
- trait CommandResultWithReply[Command, State, Reply] extends CommandResult[Command, State]
The result of running a command with a
replyTo: ActorRef[R], i.e.The result of running a command with a
replyTo: ActorRef[R], i.e. therunCommandwith anActorRef[R] => Commandparameter.- Annotations
- @DoNotInherit()
- trait RestartResult[State] extends AnyRef
The result of restarting the behavior.
The result of restarting the behavior.
- Annotations
- @DoNotInherit()
- final class SerializationSettings extends AnyRef
Customization of which serialization checks that are performed.
Customization of which serialization checks that are performed.
equalsmust be implemented (or usingcase class) whenverifyEqualityis 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
- def apply[Command, State](system: ActorSystem[_], behavior: Behavior[Command], serializationSettings: SerializationSettings): DurableStateBehaviorTestKit[Command, State]
Factory method to create a new DurableStateBehaviorTestKit with custom SerializationSettings.
Factory method to create a new DurableStateBehaviorTestKit with custom SerializationSettings.
Note that
equalsmust be implemented (or usingcase class) in the commands and state ifverifyEqualityis enabled. - def apply[Command, State](system: ActorSystem[_], behavior: Behavior[Command]): DurableStateBehaviorTestKit[Command, State]
Factory method to create a new DurableStateBehaviorTestKit.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @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 toScalaTestWithActorTestKit. The configuration enables the in-memory durable state store. - 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
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @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
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @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])
- object SerializationSettings