+tes #12681 add EchoActor
This commit is contained in:
parent
0e2f356d23
commit
7ca3a9699e
5 changed files with 53 additions and 37 deletions
24
akka-testkit/src/main/scala/akka/testkit/TestActors.scala
Normal file
24
akka-testkit/src/main/scala/akka/testkit/TestActors.scala
Normal 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]()
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue