hayio
6/28/2015 - 2:35 PM

Base specs for scalatest basic and akka tests.

Base specs for scalatest basic and akka tests.

import akka.actor.ActorSystem
import akka.testkit.TestKit
import org.scalatest._
import org.scalatest.concurrent._

import com.sentihub.util.ResourceUtil

abstract class BaseSpec extends FlatSpec with Matchers with Eventually
  with BeforeAndAfterAll with BeforeAndAfterEach with OptionValues

abstract class AkkaSpec(name: String)
  extends TestKit(ActorSystem(name))
  with FlatSpecLike
  with Matchers
  with BeforeAndAfterAll
  with Eventually {
  override def afterAll() {
    TestKit.shutdownActorSystem(system)
  }
}