diff --git a/build.sbt b/build.sbt index 62abe6c..dadd7c1 100644 --- a/build.sbt +++ b/build.sbt @@ -2,9 +2,9 @@ name := "scalatest-matchers" version := "0.1" -scalaVersion := "2.12.8" +scalaVersion := "2.13.6" libraryDependencies ++= Seq( - "org.scalatest" %% "scalatest" % "3.0.5", - "com.ironcorelabs" %% "cats-scalatest" % "2.4.0" + "org.scalatest" %% "scalatest" % "3.2.9", + "com.ironcorelabs" %% "cats-scalatest" % "3.1.1" ).map(_ % Test) \ No newline at end of file diff --git a/project/build.properties b/project/build.properties index 7609b47..215ddd2 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.2.8 \ No newline at end of file +sbt.version = 1.5.5 \ No newline at end of file diff --git a/src/test/scala/org/kunicki/scalatest/BaseSpec.scala b/src/test/scala/org/kunicki/scalatest/BaseSpec.scala index 513df32..c7f8f21 100644 --- a/src/test/scala/org/kunicki/scalatest/BaseSpec.scala +++ b/src/test/scala/org/kunicki/scalatest/BaseSpec.scala @@ -1,5 +1,6 @@ package org.kunicki.scalatest -import org.scalatest.{FlatSpec, Matchers} +import org.scalatest.flatspec.AnyFlatSpec +import org.scalatest.matchers.should.Matchers -trait BaseSpec extends FlatSpec with Matchers +trait BaseSpec extends AnyFlatSpec with Matchers diff --git a/src/test/scala/org/kunicki/scalatest/examples/1_OptionsAndEithers.scala b/src/test/scala/org/kunicki/scalatest/examples/1_OptionsAndEithers.scala index b9480ef..0e42915 100644 --- a/src/test/scala/org/kunicki/scalatest/examples/1_OptionsAndEithers.scala +++ b/src/test/scala/org/kunicki/scalatest/examples/1_OptionsAndEithers.scala @@ -45,12 +45,12 @@ class OptionHasValue extends BaseSpec with OptionValues { class EitherHasValue extends BaseSpec with EitherValues { it should "check if an Either is right with get" in { - either.right.get shouldBe 1 + either.value shouldBe 1 } //region either value it should "check if an Either is right with value" in { - either.right.value shouldBe 1 + either.value shouldBe 1 } //endregion diff --git a/src/test/scala/org/kunicki/scalatest/examples/3_Futures.scala b/src/test/scala/org/kunicki/scalatest/examples/3_Futures.scala index da7d00e..d177849 100644 --- a/src/test/scala/org/kunicki/scalatest/examples/3_Futures.scala +++ b/src/test/scala/org/kunicki/scalatest/examples/3_Futures.scala @@ -2,7 +2,8 @@ package org.kunicki.scalatest.examples import org.kunicki.scalatest.BaseSpec import org.scalatest.concurrent.{IntegrationPatience, ScalaFutures} -import org.scalatest.{AsyncFlatSpec, Matchers} +import org.scalatest.flatspec.AsyncFlatSpec +import org.scalatest.matchers.should.Matchers import scala.concurrent.duration.Duration import scala.concurrent.{Await, ExecutionContext, Future} diff --git a/src/test/scala/org/kunicki/scalatest/fixtures/Goodies.scala b/src/test/scala/org/kunicki/scalatest/fixtures/Goodies.scala index 5ece7f2..d040b6b 100644 --- a/src/test/scala/org/kunicki/scalatest/fixtures/Goodies.scala +++ b/src/test/scala/org/kunicki/scalatest/fixtures/Goodies.scala @@ -1,6 +1,7 @@ package org.kunicki.scalatest.fixtures +import org.scalatest.OptionValues import org.scalatest.concurrent.{Eventually, ScalaFutures} -import org.scalatest.{Matchers, OptionValues} +import org.scalatest.matchers.should.Matchers trait Goodies extends Matchers with Eventually with OptionValues with ScalaFutures diff --git a/src/test/scala/org/kunicki/scalatest/fixtures/NotificationServiceCustomMethodSpec.scala b/src/test/scala/org/kunicki/scalatest/fixtures/NotificationServiceCustomMethodSpec.scala index 76d489e..b093cea 100644 --- a/src/test/scala/org/kunicki/scalatest/fixtures/NotificationServiceCustomMethodSpec.scala +++ b/src/test/scala/org/kunicki/scalatest/fixtures/NotificationServiceCustomMethodSpec.scala @@ -1,11 +1,11 @@ package org.kunicki.scalatest.fixtures -import org.scalatest.FlatSpec +import org.scalatest.flatspec.AnyFlatSpec import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future -class NotificationServiceCustomMethodSpec extends FlatSpec with Goodies { +class NotificationServiceCustomMethodSpec extends AnyFlatSpec with Goodies { case class Fixture(user: User, notificationService: NotificationService) { diff --git a/src/test/scala/org/kunicki/scalatest/fixtures/NotificationServiceFixtureSpec.scala b/src/test/scala/org/kunicki/scalatest/fixtures/NotificationServiceFixtureSpec.scala index dc2082a..2153622 100644 --- a/src/test/scala/org/kunicki/scalatest/fixtures/NotificationServiceFixtureSpec.scala +++ b/src/test/scala/org/kunicki/scalatest/fixtures/NotificationServiceFixtureSpec.scala @@ -1,11 +1,12 @@ package org.kunicki.scalatest.fixtures -import org.scalatest.{Outcome, fixture} +import org.scalatest.Outcome +import org.scalatest.flatspec.FixtureAnyFlatSpec import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future -class NotificationServiceFixtureSpec extends fixture.FlatSpec with Goodies { +class NotificationServiceFixtureSpec extends FixtureAnyFlatSpec with Goodies { case class FixtureParam(user: User, notificationService: NotificationService) { diff --git a/src/test/scala/org/kunicki/scalatest/fixtures/NotificationServiceSpec.scala b/src/test/scala/org/kunicki/scalatest/fixtures/NotificationServiceSpec.scala index 48ee439..1d2dbc7 100644 --- a/src/test/scala/org/kunicki/scalatest/fixtures/NotificationServiceSpec.scala +++ b/src/test/scala/org/kunicki/scalatest/fixtures/NotificationServiceSpec.scala @@ -1,10 +1,10 @@ package org.kunicki.scalatest.fixtures -import org.scalatest.FlatSpec +import org.scalatest.flatspec.AnyFlatSpec import scala.concurrent.ExecutionContext.Implicits.global -class NotificationServiceSpec extends FlatSpec with Goodies { +class NotificationServiceSpec extends AnyFlatSpec with Goodies { it should "create a notification" in { // given