move code to src/test
* so that it compiles and tests pass * fix some additional snip references in getting started
This commit is contained in:
parent
413df8e0f4
commit
59f53e1a22
289 changed files with 45 additions and 45 deletions
30
akka-docs/src/test/scala/docs/testkit/PlainWordSpec.scala
Normal file
30
akka-docs/src/test/scala/docs/testkit/PlainWordSpec.scala
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/**
|
||||
* Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com>
|
||||
*/
|
||||
package docs.testkit
|
||||
|
||||
//#plain-spec
|
||||
import akka.actor.ActorSystem
|
||||
import akka.testkit.{ ImplicitSender, TestActors, TestKit }
|
||||
import org.scalatest.{ BeforeAndAfterAll, Matchers, WordSpecLike }
|
||||
|
||||
//#implicit-sender
|
||||
class MySpec() extends TestKit(ActorSystem("MySpec")) with ImplicitSender
|
||||
with WordSpecLike with Matchers with BeforeAndAfterAll {
|
||||
//#implicit-sender
|
||||
|
||||
override def afterAll {
|
||||
TestKit.shutdownActorSystem(system)
|
||||
}
|
||||
|
||||
"An Echo actor" must {
|
||||
|
||||
"send back messages unchanged" in {
|
||||
val echo = system.actorOf(TestActors.echoActorProps)
|
||||
echo ! "hello world"
|
||||
expectMsg("hello world")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//#plain-spec
|
||||
Loading…
Add table
Add a link
Reference in a new issue