mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-01-19 18:44:45 +00:00
26 lines
876 B
Scala
26 lines
876 B
Scala
// Copyright (c) 2017 PSForever
|
|
package objects
|
|
|
|
import akka.actor.ActorSystem
|
|
import akka.testkit.{ImplicitSender, TestKit}
|
|
import com.typesafe.config.{ConfigFactory, ConfigValueFactory}
|
|
import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike}
|
|
import org.specs2.specification.Scope
|
|
|
|
abstract class ActorTest(sys : ActorSystem = ActorSystem("system", ConfigFactory.parseMap(ActorTest.LoggingConfig)))
|
|
extends TestKit(sys) with Scope with ImplicitSender with WordSpecLike with Matchers with BeforeAndAfterAll {
|
|
override def afterAll {
|
|
TestKit.shutdownActorSystem(system)
|
|
}
|
|
}
|
|
|
|
object ActorTest {
|
|
import scala.collection.JavaConverters._
|
|
private val LoggingConfig = Map(
|
|
"akka.loggers" -> List("akka.testkit.TestEventListener").asJava,
|
|
"akka.loglevel" -> "OFF",
|
|
"akka.stdout-loglevel" -> "OFF",
|
|
"akka.log-dead-letters" -> "OFF"
|
|
).asJava
|
|
}
|