Created
February 18, 2015 17:06
-
-
Save polymorphic/52d4db542ead6b272c87 to your computer and use it in GitHub Desktop.
FunSuite w/ Akka TestKit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import akka.actor.ActorSystem | |
import akka.testkit.{DefaultTimeout, ImplicitSender, TestKit} | |
import com.typesafe.config.ConfigFactory | |
import org.scalatest.BeforeAndAfterAll | |
import org.scalatest.FunSuiteLike | |
class AgentServerSuite extends TestKit(ActorSystem("AgentServerSuite")) | |
with FunSuiteLike | |
with DefaultTimeout | |
with ImplicitSender | |
with BeforeAndAfterAll { | |
val myConfig = ConfigFactory.parseResources("test.conf").getConfig("wp.balancer") | |
val agentServer = system.actorOf(AgentServer.getProps("test service", myConfig)) | |
override protected def beforeAll(): Unit = { | |
} | |
override def afterAll: Unit = { | |
shutdown() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment