Make typed TestProbe a RecipientRef (#29928)

This commit is contained in:
Levi Ramsey 2021-01-11 05:53:42 -05:00 committed by GitHub
parent 51548f6227
commit 1fd66f5f49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 3 deletions

View file

@ -49,6 +49,9 @@ The following demonstrates:
* Creating a `TestProbe`
* Verifying that the actor under test responds via the `TestProbe`
Note that it is possible to use a `TestProbe` directly as a @apidoc[akka.actor.typed.RecipientRef] (a common supertype of `ActorRef` and @ref:[Cluster Sharding](cluster-sharding.md)
`EntityRef`), in cases where a message protocol uses `RecipientRef` instead of specifying `ActorRef` or `EntityRef`.
Scala
: @@snip [AsyncTestingExampleSpec.scala](/akka-actor-testkit-typed/src/test/scala/docs/akka/actor/testkit/typed/scaladsl/AsyncTestingExampleSpec.scala) { #test-spawn }