Class ActorTestKitBase
java.lang.Object
org.apache.pekko.actor.testkit.typed.scaladsl.ActorTestKitBase
- Direct Known Subclasses:
ScalaTestWithActorTestKit
A base class for the
ActorTestKit, making it possible to have testing framework (e.g. ScalaTest)
manage the lifecycle of the testkit.
An implementation for ScalaTest is ScalaTestWithActorTestKit.
Another abstract class that is testing framework specific should extend this class and
automatically shut down the testKit when the test completes or fails by implementing afterAll().
-
Constructor Summary
ConstructorsConstructorDescriptionActorTestKitBase(com.typesafe.config.Config config) Use a custom config for the actor system.ActorTestKitBase(com.typesafe.config.Config config, TestKitSettings settings) Use a custom config for the actor system, and a custompekko.actor.testkit.typed.TestKitSettings.ActorTestKitBase(String config) Use a custom config for the actor system.ActorTestKitBase(ActorTestKit testKit) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidafterAll()To be implemented by "more" concrete class that can mixinBeforeAndAfterAllor similar, for exampleFlatSpecLike with BeforeAndAfterAll.See corresponding method onActorTestKitSee corresponding method onActorTestKit<M> TestProbe<M>See corresponding method onActorTestKit<M> TestProbe<M>createTestProbe(String name) See corresponding method onActorTestKitSee corresponding method onActorTestKitAdditional testing utilities for serialization.<T> ActorRef<T>See corresponding method onActorTestKit<T> ActorRef<T>See corresponding method onActorTestKit<T> ActorRef<T>See corresponding method onActorTestKit<T> ActorRef<T>See corresponding method onActorTestKitActorSystem<scala.runtime.Nothing$>system()See corresponding method onActorTestKittestKit()See corresponding method onActorTestKitstatic Stringtimeout()See corresponding method onActorTestKit
-
Constructor Details
-
ActorTestKitBase
-
ActorTestKitBase
public ActorTestKitBase() -
ActorTestKitBase
Use a custom config for the actor system. -
ActorTestKitBase
public ActorTestKitBase(com.typesafe.config.Config config) Use a custom config for the actor system. -
ActorTestKitBase
Use a custom config for the actor system, and a custompekko.actor.testkit.typed.TestKitSettings.
-
-
Method Details
-
testNameFromCallStack
-
testKit
-
system
See corresponding method onActorTestKit -
testKitSettings
See corresponding method onActorTestKit -
timeout
See corresponding method onActorTestKit -
spawn
See corresponding method onActorTestKit -
spawn
See corresponding method onActorTestKit -
spawn
See corresponding method onActorTestKit -
spawn
See corresponding method onActorTestKit -
createTestProbe
See corresponding method onActorTestKit -
createTestProbe
See corresponding method onActorTestKit -
createDroppedMessageProbe
See corresponding method onActorTestKit -
createDeadLetterProbe
See corresponding method onActorTestKit -
createUnhandledMessageProbe
See corresponding method onActorTestKit -
serializationTestKit
Additional testing utilities for serialization. -
afterAll
protected abstract void afterAll()To be implemented by "more" concrete class that can mixinBeforeAndAfterAllor similar, for exampleFlatSpecLike with BeforeAndAfterAll. Implement by callingtestKit.shutdownTestKit().
-