Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scalatest to 3.2.3 #25

Merged
merged 1 commit into from
Nov 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion project/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object Settings {
"com.typesafe.play" %% "play-json" % "2.7.4",
"com.github.julien-truffaut" %% "monocle-core" % "2.1.0",
"org.typelevel" %% "alleycats-core" % "2.2.0",
"org.scalatest" %% "scalatest" % "3.0.9" % Test
"org.scalatest" %% "scalatest" % "3.2.3" % Test
),
scalacOptions ++= Seq("-language:higherKinds"),
addCompilerPlugin("org.typelevel" % "kind-projector" % "0.11.0" cross CrossVersion.full),
Expand Down
6 changes: 4 additions & 2 deletions src/test/scala/nl/vroste/playjsonoptics/JsLensSpec.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package nl.vroste.playjsonoptics

import org.scalatest.{FlatSpec, Inside, MustMatchers, OptionValues}
import org.scalatest.{Inside, OptionValues}
import play.api.libs.json._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.must.Matchers

class JsLensSpec extends FlatSpec with MustMatchers with Inside with OptionValues {
class JsLensSpec extends AnyFlatSpec with Matchers with Inside with OptionValues {
"A JsLens for a single String value at some path" must "read the value at that path given applicable JSON" in {
val json = Json.obj("field1" -> JsString("value1"))

Expand Down
6 changes: 4 additions & 2 deletions src/test/scala/nl/vroste/playjsonoptics/OpticsSpec.scala
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
package nl.vroste.playjsonoptics

import org.scalatest.{FlatSpec, Inside, MustMatchers, OptionValues}
import org.scalatest.{Inside, OptionValues}
import play.api.libs.json._
import Optics._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.must.Matchers

case class DummyData(field1: String)
object DummyData {
implicit val format: Format[DummyData] = Json.format
}

class OpticsSpec extends FlatSpec with MustMatchers with Inside with OptionValues {
class OpticsSpec extends AnyFlatSpec with Matchers with Inside with OptionValues {
"The JsObject prism " must "read a JsObject for the JSON of an object" in {
val json = Json.obj("field1" -> JsString("value1"))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ import monocle.function.At._
import nl.vroste.playjsonoptics.Helpers._
import nl.vroste.playjsonoptics.JsLens
import nl.vroste.playjsonoptics.JsLens.jsAt
import org.scalatest.{FlatSpec, Inside, MustMatchers}
import org.scalatest.Inside
import play.api.libs.json._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.must.Matchers

/**
* Series of examples for how to use PlayJsonOptics to transform JSON
*/
class TransformationExamples extends FlatSpec with MustMatchers with Inside {
class TransformationExamples extends AnyFlatSpec with Matchers with Inside {

val jsonWithField =
Json.parse(
Expand Down