diff --git a/build.sbt b/build.sbt index ef223585..b5238843 100644 --- a/build.sbt +++ b/build.sbt @@ -9,8 +9,7 @@ lazy val scalaVersionsAll = Seq(scala_2_11Version, scala_2_12Version, scala_2_1 lazy val theScalaVersion = scala_2_12Version -lazy val scalaTestVersion = "3.1.1" -lazy val scalacheckVersion = "1.14.3" +lazy val scalaTestVersion = "3.2.9" // Library versions lazy val reactiveMongoVersion = "1.0.0" @@ -72,6 +71,12 @@ def theCirceVersion(scalaVersion: String) = throw new IllegalArgumentException(s"Unsupported Scala version $scalaVersion") } +def theScalacheckVersion(scalaVersion: String) = + CrossVersion.partialVersion(scalaVersion) match { + case Some((2, 11)) => "1.15.2" + case _ => "1.15.4" + } + def scalaTestPlay(scalaVersion: String) = CrossVersion.partialVersion(scalaVersion) match { case Some((2, scalaMajor)) if scalaMajor >= 12 => "org.scalatestplus.play" %% "scalatestplus-play" % "5.0.0" % Test @@ -407,7 +412,7 @@ lazy val enumeratumScalacheck = crossProject(JSPlatform, JVMPlatform) libraryDependencies ++= { Seq( "com.beachape" %%% "enumeratum" % Versions.Core.stable, - "org.scalacheck" %%% "scalacheck" % scalacheckVersion, + "org.scalacheck" %%% "scalacheck" % theScalacheckVersion(scalaVersion.value), "org.scalatestplus" %%% "scalacheck-1-14" % "3.1.1.1" % Test, "com.beachape" %%% "enumeratum-test" % Versions.Core.stable % Test ) diff --git a/enumeratum-argonaut/src/test/scala/enumeratum/ArgonautSpec.scala b/enumeratum-argonaut/src/test/scala/enumeratum/ArgonautSpec.scala index e77fb1e6..49973127 100644 --- a/enumeratum-argonaut/src/test/scala/enumeratum/ArgonautSpec.scala +++ b/enumeratum-argonaut/src/test/scala/enumeratum/ArgonautSpec.scala @@ -1,13 +1,14 @@ package enumeratum -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import argonaut._ import Argonaut._ /** Created by alonsodomin on 14/10/2016. */ -class ArgonautSpec extends FunSpec with Matchers { +class ArgonautSpec extends AnyFunSpec with Matchers { describe("to JSON") { it("should work") { diff --git a/enumeratum-argonaut/src/test/scala/enumeratum/values/ArgonautValueEnumSpec.scala b/enumeratum-argonaut/src/test/scala/enumeratum/values/ArgonautValueEnumSpec.scala index 81186cb1..2a39a94c 100644 --- a/enumeratum-argonaut/src/test/scala/enumeratum/values/ArgonautValueEnumSpec.scala +++ b/enumeratum-argonaut/src/test/scala/enumeratum/values/ArgonautValueEnumSpec.scala @@ -1,12 +1,13 @@ package enumeratum.values -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import argonaut._ import Argonaut._ /** Created by alonsodomin on 14/10/2016. */ -class ArgonautValueEnumSpec extends FunSpec with Matchers { +class ArgonautValueEnumSpec extends AnyFunSpec with Matchers { testArgonautEnum("LongArgonautEnum", ArgonautMediaType) testArgonautEnum("IntArgonautEnum", ArgonautJsonLibs) diff --git a/enumeratum-cats/src/test/scala/enumeratum/CatsEnumSpec.scala b/enumeratum-cats/src/test/scala/enumeratum/CatsEnumSpec.scala index 683ab453..83e151fc 100644 --- a/enumeratum-cats/src/test/scala/enumeratum/CatsEnumSpec.scala +++ b/enumeratum-cats/src/test/scala/enumeratum/CatsEnumSpec.scala @@ -4,9 +4,11 @@ import cats.{Eq, Hash, Show} import cats.syntax.eq._ import cats.syntax.show._ import org.scalatest.concurrent.ScalaFutures -import org.scalatest.{BeforeAndAfterAll, FreeSpec, Matchers} +import org.scalatest.BeforeAndAfterAll +import org.scalatest.freespec.AnyFreeSpec +import org.scalatest.matchers.should.Matchers -class CatsEnumSpec extends FreeSpec with ScalaFutures with Matchers with BeforeAndAfterAll { +class CatsEnumSpec extends AnyFreeSpec with ScalaFutures with Matchers with BeforeAndAfterAll { "CatsEnum" - { "has a proper Eq instance" - { diff --git a/enumeratum-cats/src/test/scala/enumeratum/values/CatsOrderValueEnumSpec.scala b/enumeratum-cats/src/test/scala/enumeratum/values/CatsOrderValueEnumSpec.scala index e82d13c3..4677de99 100644 --- a/enumeratum-cats/src/test/scala/enumeratum/values/CatsOrderValueEnumSpec.scala +++ b/enumeratum-cats/src/test/scala/enumeratum/values/CatsOrderValueEnumSpec.scala @@ -4,9 +4,10 @@ import cats.Order import cats.instances.int._ import cats.syntax.order._ import org.scalatest.concurrent.ScalaFutures -import org.scalatest.{FreeSpec, Matchers} +import org.scalatest.freespec.AnyFreeSpec +import org.scalatest.matchers.should.Matchers -class CatsOrderValueEnumSpec extends FreeSpec with ScalaFutures with Matchers { +class CatsOrderValueEnumSpec extends AnyFreeSpec with ScalaFutures with Matchers { "CatsOrderedValueEnum" - { "has a proper Order instance" - { diff --git a/enumeratum-cats/src/test/scala/enumeratum/values/CatsValueEnumSpec.scala b/enumeratum-cats/src/test/scala/enumeratum/values/CatsValueEnumSpec.scala index 08adc3eb..7b40a766 100644 --- a/enumeratum-cats/src/test/scala/enumeratum/values/CatsValueEnumSpec.scala +++ b/enumeratum-cats/src/test/scala/enumeratum/values/CatsValueEnumSpec.scala @@ -4,9 +4,10 @@ import cats.syntax.eq._ import cats.syntax.show._ import cats.{Eq, Show} import org.scalatest.concurrent.ScalaFutures -import org.scalatest.{FreeSpec, Matchers} +import org.scalatest.freespec.AnyFreeSpec +import org.scalatest.matchers.should.Matchers -class CatsValueEnumSpec extends FreeSpec with ScalaFutures with Matchers { +class CatsValueEnumSpec extends AnyFreeSpec with ScalaFutures with Matchers { "CatsValueEnum" - { "has a proper Eq instance" - { diff --git a/enumeratum-circe/src/test/scala/enumeratum/CirceKeySpec.scala b/enumeratum-circe/src/test/scala/enumeratum/CirceKeySpec.scala index 0233f8ad..b3d5a0d6 100644 --- a/enumeratum-circe/src/test/scala/enumeratum/CirceKeySpec.scala +++ b/enumeratum-circe/src/test/scala/enumeratum/CirceKeySpec.scala @@ -1,11 +1,12 @@ package enumeratum -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import cats.syntax.either._ import io.circe.Json import io.circe.syntax._ -class CirceKeySpec extends FunSpec with Matchers { +class CirceKeySpec extends AnyFunSpec with Matchers { describe("to JSON") { it("should work") { Map(ShirtSize.Small -> 5, ShirtSize.Large -> 10).asJson shouldBe Json.obj( diff --git a/enumeratum-circe/src/test/scala/enumeratum/CirceSpec.scala b/enumeratum-circe/src/test/scala/enumeratum/CirceSpec.scala index db9ee932..9d6cfba6 100644 --- a/enumeratum-circe/src/test/scala/enumeratum/CirceSpec.scala +++ b/enumeratum-circe/src/test/scala/enumeratum/CirceSpec.scala @@ -1,6 +1,7 @@ package enumeratum -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import cats.syntax.either._ import io.circe.Json import io.circe.syntax._ @@ -9,7 +10,7 @@ import io.circe.syntax._ * * Copyright 2016 */ -class CirceSpec extends FunSpec with Matchers { +class CirceSpec extends AnyFunSpec with Matchers { describe("to JSON") { diff --git a/enumeratum-circe/src/test/scala/enumeratum/values/CirceValueEnumSpec.scala b/enumeratum-circe/src/test/scala/enumeratum/values/CirceValueEnumSpec.scala index 08110ec5..e76a04f1 100644 --- a/enumeratum-circe/src/test/scala/enumeratum/values/CirceValueEnumSpec.scala +++ b/enumeratum-circe/src/test/scala/enumeratum/values/CirceValueEnumSpec.scala @@ -1,6 +1,7 @@ package enumeratum.values -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import cats.syntax.either._ import io.circe.{Decoder, Encoder, KeyDecoder, KeyEncoder, Json} import io.circe.syntax._ @@ -9,7 +10,7 @@ import io.circe.syntax._ * * Copyright 2016 */ -class CirceValueEnumSpec extends FunSpec with Matchers { +class CirceValueEnumSpec extends AnyFunSpec with Matchers { testCirceEnum("LongCirceEnum", CirceContentType) testCirceEnum("ShortCirceEnum", CirceDrinks) diff --git a/enumeratum-core-jvm-tests/src/test/scala/enumeratum/EnumJVMSpec.scala b/enumeratum-core-jvm-tests/src/test/scala/enumeratum/EnumJVMSpec.scala index c2871ebd..b6ebe4c4 100644 --- a/enumeratum-core-jvm-tests/src/test/scala/enumeratum/EnumJVMSpec.scala +++ b/enumeratum-core-jvm-tests/src/test/scala/enumeratum/EnumJVMSpec.scala @@ -1,8 +1,9 @@ package enumeratum -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers -class EnumJVMSpec extends FunSpec with Matchers { +class EnumJVMSpec extends AnyFunSpec with Matchers { describe("findValues Vector") { diff --git a/enumeratum-core-jvm-tests/src/test/scala/enumeratum/values/ValueEnumJVMSpec.scala b/enumeratum-core-jvm-tests/src/test/scala/enumeratum/values/ValueEnumJVMSpec.scala index 72c83e86..ad59cdb0 100644 --- a/enumeratum-core-jvm-tests/src/test/scala/enumeratum/values/ValueEnumJVMSpec.scala +++ b/enumeratum-core-jvm-tests/src/test/scala/enumeratum/values/ValueEnumJVMSpec.scala @@ -1,7 +1,8 @@ package enumeratum.values import enumeratum.Eval -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import scala.reflect.ClassTag import scala.util.Random @@ -10,7 +11,7 @@ import scala.util.Random * * Copyright 2016 */ -class ValueEnumJVMSpec extends FunSpec with Matchers { +class ValueEnumJVMSpec extends AnyFunSpec with Matchers { private def stringGenerator = Random.alphanumeric.grouped(10).toStream.map(_.mkString.replaceAll("[0-9]", "")).distinct diff --git a/enumeratum-core/src/test/scala/enumeratum/EnumSpec.scala b/enumeratum-core/src/test/scala/enumeratum/EnumSpec.scala index 74bf9570..793a1c18 100644 --- a/enumeratum-core/src/test/scala/enumeratum/EnumSpec.scala +++ b/enumeratum-core/src/test/scala/enumeratum/EnumSpec.scala @@ -1,9 +1,10 @@ package enumeratum import org.scalatest.OptionValues._ -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers -class EnumSpec extends FunSpec with Matchers { +class EnumSpec extends AnyFunSpec with Matchers { describe("no values") { diff --git a/enumeratum-core/src/test/scala/enumeratum/values/ValueEnumHelpers.scala b/enumeratum-core/src/test/scala/enumeratum/values/ValueEnumHelpers.scala index c65a52a6..acfc5a14 100644 --- a/enumeratum-core/src/test/scala/enumeratum/values/ValueEnumHelpers.scala +++ b/enumeratum-core/src/test/scala/enumeratum/values/ValueEnumHelpers.scala @@ -2,13 +2,14 @@ package enumeratum.values import java.util.NoSuchElementException -import org.scalatest._ +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers /** Created by Lloyd on 4/13/16. * * Copyright 2016 */ -trait ValueEnumHelpers { this: FunSpec with Matchers => +trait ValueEnumHelpers { this: AnyFunSpec with Matchers => /* * Generates tests for a given enum and groups the tests inside the given enumKind descriptor diff --git a/enumeratum-core/src/test/scala/enumeratum/values/ValueEnumSpec.scala b/enumeratum-core/src/test/scala/enumeratum/values/ValueEnumSpec.scala index 2ab6f15d..39c831c6 100644 --- a/enumeratum-core/src/test/scala/enumeratum/values/ValueEnumSpec.scala +++ b/enumeratum-core/src/test/scala/enumeratum/values/ValueEnumSpec.scala @@ -1,12 +1,13 @@ package enumeratum.values -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers /** Created by Lloyd on 4/12/16. * * Copyright 2016 */ -class ValueEnumSpec extends FunSpec with Matchers with ValueEnumHelpers { +class ValueEnumSpec extends AnyFunSpec with Matchers with ValueEnumHelpers { describe("basic sanity check") { diff --git a/enumeratum-doobie/src/test/scala/enumeratum/DoobieEnumSpec.scala b/enumeratum-doobie/src/test/scala/enumeratum/DoobieEnumSpec.scala index 035c3618..42373b28 100644 --- a/enumeratum-doobie/src/test/scala/enumeratum/DoobieEnumSpec.scala +++ b/enumeratum-doobie/src/test/scala/enumeratum/DoobieEnumSpec.scala @@ -1,11 +1,12 @@ package enumeratum -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import doobie.util.{Read => DoobieRead, Write => DoobieWrite} import scala.collection.immutable -class DoobieEnumSpec extends FunSpec with Matchers { +class DoobieEnumSpec extends AnyFunSpec with Matchers { describe("A DoobieEnum") { diff --git a/enumeratum-doobie/src/test/scala/enumeratum/values/DoobieValueEnumSpec.scala b/enumeratum-doobie/src/test/scala/enumeratum/values/DoobieValueEnumSpec.scala index 877e6792..d206fab5 100644 --- a/enumeratum-doobie/src/test/scala/enumeratum/values/DoobieValueEnumSpec.scala +++ b/enumeratum-doobie/src/test/scala/enumeratum/values/DoobieValueEnumSpec.scala @@ -2,13 +2,14 @@ package enumeratum.values import cats.effect.{IO, Resource} import doobie.util.{Read => DoobieRead, Write => DoobieWrite} -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import scala.concurrent.Future import scala.concurrent.ExecutionContext import scala.collection.immutable import java.util.concurrent.{Executors, ExecutorService} -class DoobieValueEnumSpec extends FunSpec with Matchers { +class DoobieValueEnumSpec extends AnyFunSpec with Matchers { describe("An IntDoobieEnum") { diff --git a/enumeratum-json4s/src/test/scala/enumeratum/Json4sSpec.scala b/enumeratum-json4s/src/test/scala/enumeratum/Json4sSpec.scala index 558ebd2c..ccb26ecc 100644 --- a/enumeratum-json4s/src/test/scala/enumeratum/Json4sSpec.scala +++ b/enumeratum-json4s/src/test/scala/enumeratum/Json4sSpec.scala @@ -2,9 +2,10 @@ package enumeratum import org.json4s.{DefaultFormats, MappingException} import org.json4s.native.Serialization -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers -class Json4sSpec extends FunSpec with Matchers { +class Json4sSpec extends AnyFunSpec with Matchers { implicit val formats = DefaultFormats + Json4s.serializer(TrafficLight) + Json4s.keySerializer(TrafficLight) diff --git a/enumeratum-json4s/src/test/scala/enumeratum/values/Json4sValueEnumSpec.scala b/enumeratum-json4s/src/test/scala/enumeratum/values/Json4sValueEnumSpec.scala index 401eeff2..961c60fd 100644 --- a/enumeratum-json4s/src/test/scala/enumeratum/values/Json4sValueEnumSpec.scala +++ b/enumeratum-json4s/src/test/scala/enumeratum/values/Json4sValueEnumSpec.scala @@ -3,9 +3,10 @@ package enumeratum.values import org.json4s.{DefaultFormats, JObject, MappingException} import org.json4s.JsonDSL._ import org.json4s.native.Serialization -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers -class Json4sValueEnumSpec extends FunSpec with Matchers { +class Json4sValueEnumSpec extends AnyFunSpec with Matchers { implicit val formats = DefaultFormats + Json4s.serializer(Json4sMediaType) + Json4s.serializer(Json4sJsonLibs) + diff --git a/enumeratum-play/src/test/scala/enumeratum/FormSpec.scala b/enumeratum-play/src/test/scala/enumeratum/FormSpec.scala index aebe2aee..b4396b79 100644 --- a/enumeratum-play/src/test/scala/enumeratum/FormSpec.scala +++ b/enumeratum-play/src/test/scala/enumeratum/FormSpec.scala @@ -1,12 +1,13 @@ package enumeratum -import org.scalatest._ +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import play.api.data.Form import org.scalatest.OptionValues._ /** Created by Lloyd on 2/3/15. */ -class FormSpec extends FunSpec with Matchers { +class FormSpec extends AnyFunSpec with Matchers { import Forms._ diff --git a/enumeratum-play/src/test/scala/enumeratum/PlayEnumSpec.scala b/enumeratum-play/src/test/scala/enumeratum/PlayEnumSpec.scala index ca5eaa2d..e6e2084b 100644 --- a/enumeratum-play/src/test/scala/enumeratum/PlayEnumSpec.scala +++ b/enumeratum-play/src/test/scala/enumeratum/PlayEnumSpec.scala @@ -1,6 +1,7 @@ package enumeratum -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import play.api.data.{Form, Mapping} import play.api.http.HttpVerbs import play.api.libs.json.{Format, JsNumber, JsString, JsValue, Json => PlayJson} @@ -11,7 +12,7 @@ import play.api.routing.sird.PathBindableExtractor import play.api.test.FakeRequest import enumeratum.helpers.ActionHelper -class PlayEnumSpec extends FunSpec with Matchers { +class PlayEnumSpec extends AnyFunSpec with Matchers { testScenarios( descriptor = "ordinary operation (no tarnsforms)", diff --git a/enumeratum-play/src/test/scala/enumeratum/UrlBindersSpec.scala b/enumeratum-play/src/test/scala/enumeratum/UrlBindersSpec.scala index beb362fb..9683757f 100644 --- a/enumeratum-play/src/test/scala/enumeratum/UrlBindersSpec.scala +++ b/enumeratum-play/src/test/scala/enumeratum/UrlBindersSpec.scala @@ -1,13 +1,14 @@ package enumeratum import UrlBinders._ -import org.scalatest._ +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import org.scalatest.OptionValues._ import org.scalatest.EitherValues._ /** Created by Lloyd on 2/3/15. */ -class UrlBindersSpec extends FunSpec with Matchers { +class UrlBindersSpec extends AnyFunSpec with Matchers { describe(".pathBinder") { diff --git a/enumeratum-play/src/test/scala/enumeratum/values/PlayValueEnumHelpers.scala b/enumeratum-play/src/test/scala/enumeratum/values/PlayValueEnumHelpers.scala index 9c6e2e1b..7364e1c6 100644 --- a/enumeratum-play/src/test/scala/enumeratum/values/PlayValueEnumHelpers.scala +++ b/enumeratum-play/src/test/scala/enumeratum/values/PlayValueEnumHelpers.scala @@ -1,6 +1,7 @@ package enumeratum.values -import org.scalatest._ +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import play.api.data.Form import play.api.http.HttpVerbs import org.scalatest.OptionValues._ @@ -13,7 +14,7 @@ import enumeratum.helpers.ActionHelper * * Copyright 2016 */ -trait PlayValueEnumHelpers extends EnumJsonFormatHelpers { this: FunSpec with Matchers => +trait PlayValueEnumHelpers extends EnumJsonFormatHelpers { this: AnyFunSpec with Matchers => def testNumericPlayEnum[EntryType <: ValueEnumEntry[ ValueType diff --git a/enumeratum-play/src/test/scala/enumeratum/values/PlayValueEnumSpec.scala b/enumeratum-play/src/test/scala/enumeratum/values/PlayValueEnumSpec.scala index 4940b2c0..36c94399 100644 --- a/enumeratum-play/src/test/scala/enumeratum/values/PlayValueEnumSpec.scala +++ b/enumeratum-play/src/test/scala/enumeratum/values/PlayValueEnumSpec.scala @@ -1,6 +1,7 @@ package enumeratum.values -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import play.api.libs.json.{JsNumber, JsString} import EnumFormats.charFormat @@ -8,7 +9,7 @@ import EnumFormats.charFormat * * Copyright 2016 */ -class PlayValueEnumSpec extends FunSpec with Matchers with PlayValueEnumHelpers { +class PlayValueEnumSpec extends AnyFunSpec with Matchers with PlayValueEnumHelpers { testNumericPlayEnum("LongPlayEnum", PlayContentType) testNumericPlayEnum("ShortPlayEnum", PlayDrinks) diff --git a/enumeratum-quill/src/test/scala/enumeratum/QuillEnumSpec.scala b/enumeratum-quill/src/test/scala/enumeratum/QuillEnumSpec.scala index 70ae7e7a..86f1bad5 100644 --- a/enumeratum-quill/src/test/scala/enumeratum/QuillEnumSpec.scala +++ b/enumeratum-quill/src/test/scala/enumeratum/QuillEnumSpec.scala @@ -1,10 +1,11 @@ package enumeratum -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import scala.collection.immutable -class QuillEnumSpec extends FunSpec with Matchers { +class QuillEnumSpec extends AnyFunSpec with Matchers { describe("A QuillEnum") { diff --git a/enumeratum-quill/src/test/scala/enumeratum/values/QuillValueEnumSpec.scala b/enumeratum-quill/src/test/scala/enumeratum/values/QuillValueEnumSpec.scala index 17f35d29..dbd76a1c 100644 --- a/enumeratum-quill/src/test/scala/enumeratum/values/QuillValueEnumSpec.scala +++ b/enumeratum-quill/src/test/scala/enumeratum/values/QuillValueEnumSpec.scala @@ -1,10 +1,11 @@ package enumeratum.values -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import scala.collection.immutable -class QuillValueEnumSpec extends FunSpec with Matchers { +class QuillValueEnumSpec extends AnyFunSpec with Matchers { describe("An IntQuillEnum") { diff --git a/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/EnumBsonHandlerSpec.scala b/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/EnumBsonHandlerSpec.scala index b811e9cf..636ff68a 100644 --- a/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/EnumBsonHandlerSpec.scala +++ b/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/EnumBsonHandlerSpec.scala @@ -1,7 +1,8 @@ package enumeratum import org.scalatest.OptionValues._ -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import reactivemongo.api.bson._ import scala.util.Success @@ -10,7 +11,7 @@ import scala.util.Success * Alessandro Lacava (@lambdista) * @since 2016-04-23 */ -class EnumBsonHandlerSpec extends FunSpec with Matchers { +class EnumBsonHandlerSpec extends AnyFunSpec with Matchers { testScenario( descriptor = "normal operation (no transformations)", diff --git a/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/ReactiveMongoBsonEnumSpec.scala b/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/ReactiveMongoBsonEnumSpec.scala index 0c0a7b5d..215611c6 100644 --- a/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/ReactiveMongoBsonEnumSpec.scala +++ b/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/ReactiveMongoBsonEnumSpec.scala @@ -2,14 +2,15 @@ package enumeratum import scala.util.Success -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import reactivemongo.api.bson.{BSON, BSONDocument, BSONInteger, BSONString, BSONValue} /** @author * Alessandro Lacava (@lambdista) * @since 2016-04-23 */ -class ReactiveMongoBsonEnumSpec extends FunSpec with Matchers { +class ReactiveMongoBsonEnumSpec extends AnyFunSpec with Matchers { describe("BSON serdes") { diff --git a/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/values/EnumBsonHandlerHelpers.scala b/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/values/EnumBsonHandlerHelpers.scala index 7bc56ae2..8b9640af 100644 --- a/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/values/EnumBsonHandlerHelpers.scala +++ b/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/values/EnumBsonHandlerHelpers.scala @@ -2,14 +2,15 @@ package enumeratum.values import scala.util.Success -import org.scalatest._ +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import reactivemongo.api.bson._ /** @author * Alessandro Lacava (@lambdista) * @since 2016-04-23 */ -trait EnumBsonHandlerHelpers { this: FunSpec with Matchers => +trait EnumBsonHandlerHelpers { this: AnyFunSpec with Matchers => def testWriter[EntryType <: ValueEnumEntry[ValueType], ValueType]( enumKind: String, diff --git a/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/values/EnumBsonHandlerSpec.scala b/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/values/EnumBsonHandlerSpec.scala index a9fe17d1..d2c113b7 100644 --- a/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/values/EnumBsonHandlerSpec.scala +++ b/enumeratum-reactivemongo-bson/src/test/scala/enumeratum/values/EnumBsonHandlerSpec.scala @@ -1,13 +1,14 @@ package enumeratum.values import enumeratum.values.BSONValueHandlers._ -import org.scalatest._ +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers /** @author * Alessandro Lacava (@lambdista) * @since 2016-04-23 */ -class EnumBsonHandlerSpec extends FunSpec with Matchers with EnumBsonHandlerHelpers { +class EnumBsonHandlerSpec extends AnyFunSpec with Matchers with EnumBsonHandlerHelpers { describe(".reader") { diff --git a/enumeratum-scalacheck/src/test/scala/enumeratum/ScalacheckSpec.scala b/enumeratum-scalacheck/src/test/scala/enumeratum/ScalacheckSpec.scala index 6b6ec62f..ce11d7fc 100644 --- a/enumeratum-scalacheck/src/test/scala/enumeratum/ScalacheckSpec.scala +++ b/enumeratum-scalacheck/src/test/scala/enumeratum/ScalacheckSpec.scala @@ -1,10 +1,11 @@ package enumeratum -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks class ScalacheckSpec - extends FunSpec + extends AnyFunSpec with ScalaCheckDrivenPropertyChecks with Matchers with ScalacheckTest { diff --git a/enumeratum-scalacheck/src/test/scala/enumeratum/ScalacheckTest.scala b/enumeratum-scalacheck/src/test/scala/enumeratum/ScalacheckTest.scala index 0138a4d3..442c2fd4 100644 --- a/enumeratum-scalacheck/src/test/scala/enumeratum/ScalacheckTest.scala +++ b/enumeratum-scalacheck/src/test/scala/enumeratum/ScalacheckTest.scala @@ -2,11 +2,12 @@ package enumeratum import org.scalacheck.{Arbitrary, Cogen} import org.scalacheck.rng.Seed -import org.scalatest.{FunSpecLike, Matchers} +import org.scalatest.funspec.AnyFunSpecLike +import org.scalatest.matchers.should.Matchers import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks trait ScalacheckTest { - self: FunSpecLike with ScalaCheckDrivenPropertyChecks with Matchers => + self: AnyFunSpecLike with ScalaCheckDrivenPropertyChecks with Matchers => private implicit val arbSeed: Arbitrary[Seed] = Arbitrary( Arbitrary.arbitrary[Long].map(Seed.apply) diff --git a/enumeratum-scalacheck/src/test/scala/enumeratum/values/ScalacheckSpec.scala b/enumeratum-scalacheck/src/test/scala/enumeratum/values/ScalacheckSpec.scala index dc54fa8d..a65ed67b 100644 --- a/enumeratum-scalacheck/src/test/scala/enumeratum/values/ScalacheckSpec.scala +++ b/enumeratum-scalacheck/src/test/scala/enumeratum/values/ScalacheckSpec.scala @@ -1,11 +1,12 @@ package enumeratum.values import enumeratum.ScalacheckTest -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks class ScalacheckSpec - extends FunSpec + extends AnyFunSpec with ScalaCheckDrivenPropertyChecks with Matchers with ScalacheckTest { diff --git a/enumeratum-slick/src/test/scala/enumeratum/SlickEnumSupportSpec.scala b/enumeratum-slick/src/test/scala/enumeratum/SlickEnumSupportSpec.scala index ccb95cc7..66f73901 100644 --- a/enumeratum-slick/src/test/scala/enumeratum/SlickEnumSupportSpec.scala +++ b/enumeratum-slick/src/test/scala/enumeratum/SlickEnumSupportSpec.scala @@ -4,9 +4,15 @@ import enumeratum.values.SlickValueEnumSupport import org.scalatest.concurrent.PatienceConfiguration.Timeout import org.scalatest.concurrent.ScalaFutures import org.scalatest.time._ -import org.scalatest.{BeforeAndAfterAll, FreeSpec, Matchers} +import org.scalatest.BeforeAndAfterAll +import org.scalatest.freespec.AnyFreeSpec +import org.scalatest.matchers.should.Matchers -class SlickEnumSupportSpec extends FreeSpec with ScalaFutures with Matchers with BeforeAndAfterAll { +class SlickEnumSupportSpec + extends AnyFreeSpec + with ScalaFutures + with Matchers + with BeforeAndAfterAll { trait TrafficLightRepository extends SlickEnumSupport with SlickValueEnumSupport { diff --git a/enumeratum-slick/src/test/scala/enumeratum/values/SlickValueEnumSupportSpec.scala b/enumeratum-slick/src/test/scala/enumeratum/values/SlickValueEnumSupportSpec.scala index 590b91fc..a2c934a6 100644 --- a/enumeratum-slick/src/test/scala/enumeratum/values/SlickValueEnumSupportSpec.scala +++ b/enumeratum-slick/src/test/scala/enumeratum/values/SlickValueEnumSupportSpec.scala @@ -1,12 +1,14 @@ package enumeratum.values import org.scalatest.concurrent.PatienceConfiguration.Timeout -import org.scalatest.{BeforeAndAfterAll, FreeSpec, Matchers} +import org.scalatest.BeforeAndAfterAll +import org.scalatest.freespec.AnyFreeSpec +import org.scalatest.matchers.should.Matchers import org.scalatest.concurrent.ScalaFutures import org.scalatest.time._ class SlickValueEnumSupportSpec - extends FreeSpec + extends AnyFreeSpec with ScalaFutures with Matchers with BeforeAndAfterAll { diff --git a/macros/src/test/scala/enumeratum/CompilationSpec.scala b/macros/src/test/scala/enumeratum/CompilationSpec.scala index 92b56992..07d013a6 100644 --- a/macros/src/test/scala/enumeratum/CompilationSpec.scala +++ b/macros/src/test/scala/enumeratum/CompilationSpec.scala @@ -1,10 +1,11 @@ package enumeratum -import org.scalatest.{FunSpec, Matchers} +import org.scalatest.funspec.AnyFunSpec +import org.scalatest.matchers.should.Matchers import scala.language.experimental.macros -class CompilationSpec extends FunSpec with Matchers { +class CompilationSpec extends AnyFunSpec with Matchers { describe("sanity check") { it("should have proper members") {