Package org.apache.pekko.testkit
Class TestProbe
java.lang.Object
org.apache.pekko.testkit.TestKit
org.apache.pekko.testkit.TestProbe
- All Implemented Interfaces:
TestKitBase
TestKit-based probe which allows sending, reception and reply.
-
Constructor Summary
ConstructorsConstructorDescriptionTestProbe
(ActorSystem _application) TestProbe
(ActorSystem _application, String name) -
Method Summary
Modifier and TypeMethodDescriptionstatic TestProbe
apply
(String name, ActorSystem system) static TestProbe
apply
(ActorSystem system) void
Forward this message as if in the TestActor's receive method with self.forward.ref()
Shorthand to get the testActor.void
Send message to the sender of the last dequeued message.void
Send message to an actor while using the probe's TestActor as the sender.sender()
Get sender of last received message.protected String
Defines the testActor name.Methods inherited from class org.apache.pekko.testkit.TestKit
awaitCond, awaitCond$default$3, awaitCond$default$4, now, shutdownActorSystem, shutdownActorSystem$default$2, shutdownActorSystem$default$3, system, testActor
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.pekko.testkit.TestKitBase
assertForDuration, assertForDuration$default$3, awaitAssert, awaitAssert$default$2, awaitAssert$default$3, awaitCond, awaitCond$default$2, awaitCond$default$3, awaitCond$default$4, checkMissingAndUnexpected, childActorOf, childActorOf, childActorOf, childActorOf, end_$eq, expectMsg, expectMsg, expectMsg, expectMsg_internal, expectMsg_internal$default$3, expectMsgAllClassOf, expectMsgAllClassOf, expectMsgAllConformingOf, expectMsgAllConformingOf, expectMsgAllOf, expectMsgAllOf, expectMsgAllOf_internal, expectMsgAnyClassOf, expectMsgAnyClassOf, expectMsgAnyClassOf_internal, expectMsgAnyOf, expectMsgAnyOf, expectMsgAnyOf_internal, expectMsgClass, expectMsgClass, expectMsgClass_internal, expectMsgPF, expectMsgPF$default$1, expectMsgPF$default$2, expectMsgType, expectMsgType, expectNoMessage, expectNoMessage, expectNoMsg_internal, expectTerminated, expectTerminated$default$2, fishForMessage, fishForMessage$default$1, fishForMessage$default$2, fishForSpecificMessage, fishForSpecificMessage$default$1, fishForSpecificMessage$default$2, format, ignoreMsg, ignoreNoMsg, internalExpectMsgAllClassOf, internalExpectMsgAllConformingOf, lastSender, lastWasNoMsg_$eq, msgAvailable, now, receiveN, receiveN, receiveN_internal, receiveOne, receiveWhile, receiveWhile$default$1, receiveWhile$default$2, receiveWhile$default$3, remaining, remainingOr, remainingOrDefault, remainingOrDilated, setAutoPilot, shutdown, shutdown$default$1, shutdown$default$2, shutdown$default$3, testKitSettings, unwatch, watch, within, within
-
Constructor Details
-
TestProbe
-
TestProbe
-
-
Method Details
-
apply
-
apply
-
ref
Shorthand to get the testActor. -
testActorName
Description copied from interface:TestKitBase
Defines the testActor name. -
send
Send message to an actor while using the probe's TestActor as the sender. Replies will be available for inspection with all of TestKit's assertion methods. -
forward
Forward this message as if in the TestActor's receive method with self.forward. -
forward$default$2
-
sender
Get sender of last received message. -
reply
Send message to the sender of the last dequeued message.
-