File tree Expand file tree Collapse file tree
chapter04/src/test/scala/com/reactivedesignpatterns/chapter4 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,19 +10,18 @@ class StepParentSpec extends WordSpec with Matchers with BeforeAndAfterAll {
1010 " Result in the supervisor returning a reference to that actor" in {
1111 implicit val system = ActorSystem ()
1212 val testProbe = TestProbe ()
13- val parent = system.actorOf(Props ( new StepParent (testProbe.ref)) , " stepParent" )
13+ val parent = system.actorOf(Props [ StepParent ] , " stepParent" )
1414 parent.tell(Props [MyActor ], testProbe.ref)
1515 val child = testProbe.expectMsgType[ActorRef ]
16- child ! TestMessage
1716 }
1817 }
1918}
2019
2120case object TestMessage
2221
23- class StepParent ( target : ActorRef ) extends Actor {
22+ class StepParent extends Actor {
2423 override val supervisorStrategy = OneForOneStrategy () {
25- case thr : Throwable => target ! thr; Restart
24+ case thr => Restart
2625 }
2726 def receive = {
2827 case p : Props =>
You can’t perform that action at this time.
0 commit comments