Created
February 11, 2014 02:40
-
-
Save chbatey/8928367 to your computer and use it in GitHub Desktop.
Akka: Testing a message sent to an actor's parent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChildActorTest extends TestKit(ActorSystem("ChildActorTest")) with FunSuiteLike with ShouldMatchers { | |
test("Should inform parent when told to do something") { | |
val parent = TestProbe() | |
val underTest = TestActorRef(Props[ChildActor], parent.ref, "ChildActor") | |
underTest ! "Do something" | |
parent.expectMsg("I was told to do something and I did it") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment