Skip to content

Instantly share code, notes, and snippets.

@polymorphic
Created February 18, 2015 17:06
Show Gist options
  • Save polymorphic/52d4db542ead6b272c87 to your computer and use it in GitHub Desktop.
Save polymorphic/52d4db542ead6b272c87 to your computer and use it in GitHub Desktop.
FunSuite w/ Akka TestKit
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