scala
import akka.actor.{Actor, ActorSystem, Props}
import akka.testkit.{ImplicitSender, TestActorRef, TestKit}
import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike}
class MyActor extends Actor {
def receive = {
case "hello" => sender() ! "world"
}
}
class MyActorSpec extends TestKit(ActorSystem("MyActorSpec"))
with WordSpecLike
with Matchers
with BeforeAndAfterAll {
override def afterAll: Unit = {
}
"A MyActor" must {
"send back a 'world' message when receiving 'hello' message" in {
}
}
}