Refactoring the use of !! to ?+.get for Akka internal code

This commit is contained in:
Viktor Klang 2011-06-13 15:29:35 +02:00
parent 6ddee70e0b
commit 9c1a50ba2c
11 changed files with 34 additions and 34 deletions

View file

@ -114,7 +114,7 @@ class TestActorRefSpec extends WordSpec with MustMatchers with BeforeAndAfterEac
def receive = { case _ self reply nested }
}).start()
a must not be (null)
val nested = (a !! "any").get.asInstanceOf[ActorRef]
val nested = (a ? "any").as[ActorRef].get
nested must not be (null)
a must not be theSameInstanceAs(nested)
}
@ -125,7 +125,7 @@ class TestActorRefSpec extends WordSpec with MustMatchers with BeforeAndAfterEac
def receive = { case _ self reply nested }
}).start()
a must not be (null)
val nested = (a !! "any").get.asInstanceOf[ActorRef]
val nested = (a ? "any").as[ActorRef].get
nested must not be (null)
a must not be theSameInstanceAs(nested)
}
@ -160,7 +160,7 @@ class TestActorRefSpec extends WordSpec with MustMatchers with BeforeAndAfterEac
"stop when sent a poison pill" in {
val a = TestActorRef[WorkerActor].start()
intercept[ActorKilledException] {
a !! PoisonPill
(a ? PoisonPill).get
}
a must not be ('running)
a must be('shutdown)