+tes #12681 add EchoActor

This commit is contained in:
Michal Knapik 2014-06-04 20:51:12 +02:00 committed by Konrad 'ktoso' Malawski
parent 0e2f356d23
commit 7ca3a9699e
5 changed files with 53 additions and 37 deletions

View file

@ -0,0 +1,24 @@
/**
* Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.testkit
import akka.actor.{ Props, Actor }
/**
* A collection of common actor patterns used in tests.
*/
object TestActors {
/**
* EchoActor sends back received messages (unmodified).
*/
class EchoActor extends Actor {
override def receive = {
case message sender() ! message
}
}
val echoActorProps = Props[EchoActor]()
}