JsonMatchers

org.specs2.matcher.JsonMatchers
See theJsonMatchers companion trait
object JsonMatchers extends JsonMatchers

Attributes

Companion
trait
Graph
Supertypes
trait JsonMatchers
trait Expectations
trait ExpectationsDescription
trait TypedEqual
trait ExpectationsCreation
trait ResultChecks
trait MatchResultStackTrace
class Object
trait Matchable
class Any
Show all
Self type

Members list

Type members

Inherited classlikes

case object Deep extends JsonQueryType

Attributes

Inherited from:
JsonSelectors
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object First extends JsonQueryType

Attributes

Inherited from:
JsonSelectors
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class JsonBooleanSelector(b: Boolean) extends JsonSelector

Attributes

Inherited from:
JsonSelectors
Supertypes
trait Serializable
trait Product
trait Equals
trait JsonSelector
class Object
trait Matchable
class Any
Show all
case class JsonDoubleSelector(d: Double) extends JsonSelector

Attributes

Inherited from:
JsonSelectors
Supertypes
trait Serializable
trait Product
trait Equals
trait JsonSelector
class Object
trait Matchable
class Any
Show all
case class JsonFinalMatcher(queries: Seq[JsonQuery], check: Matcher[JsonType], negated: Boolean) extends JsonMatcher

This matcher can not be chained anymore with selections

This matcher can not be chained anymore with selections

Attributes

Inherited from:
JsonMatchers
Supertypes
trait Serializable
trait Product
trait Equals
class JsonMatcher
trait Matcher[String]
class Object
trait Matchable
class Any
Show all
case class JsonIndexSelector(n: Int) extends JsonSelector

Attributes

Inherited from:
JsonSelectors
Supertypes
trait Serializable
trait Product
trait Equals
trait JsonSelector
class Object
trait Matchable
class Any
Show all
case class JsonIntSelector(n: Int) extends JsonSelector

Attributes

Inherited from:
JsonSelectors
Supertypes
trait Serializable
trait Product
trait Equals
trait JsonSelector
class Object
trait Matchable
class Any
Show all
abstract class JsonMatcher extends Matcher[String]

Attributes

Inherited from:
JsonMatchers
Supertypes
trait Matcher[String]
class Object
trait Matchable
class Any
Known subtypes
object JsonMatcher

Attributes

Inherited from:
JsonMatchers
Supertypes
class Object
trait Matchable
class Any
case class JsonMatcherSelector(m: Matcher[String]) extends JsonSelector

Attributes

Inherited from:
JsonSelectors
Supertypes
trait Serializable
trait Product
trait Equals
trait JsonSelector
class Object
trait Matchable
class Any
Show all

Attributes

Inherited from:
JsonSelectors
Supertypes
trait Serializable
trait Product
trait Equals
trait JsonSelector
class Object
trait Matchable
class Any
Show all
case class JsonQuery(query: JsonQueryType, selector: JsonSelector)

Attributes

Inherited from:
JsonSelectors
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait JsonQueryType

Attributes

Inherited from:
JsonSelectors
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Deep.type
object First.type
case class JsonRegexSelector(r: Regex) extends JsonSelector

Attributes

Inherited from:
JsonSelectors
Supertypes
trait Serializable
trait Product
trait Equals
trait JsonSelector
class Object
trait Matchable
class Any
Show all
sealed trait JsonSelector

Attributes

Inherited from:
JsonSelectors
Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class JsonSelectorMatcher(queries: Seq[JsonQuery], negated: Boolean) extends JsonMatcher

This matcher can be chained to select further elements in the Json object

This matcher can be chained to select further elements in the Json object

Attributes

Inherited from:
JsonMatchers
Supertypes
trait Serializable
trait Product
trait Equals
class JsonMatcher
trait Matcher[String]
class Object
trait Matchable
class Any
Show all
case class JsonStringSelector(s: String) extends JsonSelector

Attributes

Inherited from:
JsonSelectors
Supertypes
trait Serializable
trait Product
trait Equals
trait JsonSelector
class Object
trait Matchable
class Any
Show all
case class JsonValueOrKeySelector(selector: JsonSelector) extends JsonSelector

Attributes

Inherited from:
JsonSelectors
Supertypes
trait Serializable
trait Product
trait Equals
trait JsonSelector
class Object
trait Matchable
class Any
Show all

Attributes

Inherited from:
JsonMatchersImplicits (hidden)
Supertypes
class Object
trait Matchable
class Any
trait ToJsonSelector[T]

Attributes

Inherited from:
JsonMatchersLowImplicits (hidden)
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object given_Conversion_Boolean_JsonSelector extends Conversion[Boolean, JsonSelector]

Attributes

Inherited from:
JsonMatchersImplicits (hidden)
Supertypes
class Conversion[Boolean, JsonSelector]
trait Boolean => JsonSelector
class Object
trait Matchable
class Any
object given_Conversion_Double_JsonSelector extends Conversion[Double, JsonSelector]

Attributes

Inherited from:
JsonMatchersImplicits (hidden)
Supertypes
class Conversion[Double, JsonSelector]
trait Double => JsonSelector
class Object
trait Matchable
class Any
object given_Conversion_Int_JsonSelector extends Conversion[Int, JsonSelector]

Attributes

Inherited from:
JsonMatchersImplicits (hidden)
Supertypes
class Conversion[Int, JsonSelector]
trait Int => JsonSelector
class Object
trait Matchable
class Any
object given_Conversion_Regex_JsonSelector extends Conversion[Regex, JsonSelector]

Attributes

Inherited from:
JsonMatchersImplicits (hidden)
Supertypes
class Conversion[Regex, JsonSelector]
trait Regex => JsonSelector
class Object
trait Matchable
class Any
object given_Conversion_String_JsonSelector extends Conversion[String, JsonSelector]

Attributes

Inherited from:
JsonMatchersImplicits (hidden)
Supertypes
class Conversion[String, JsonSelector]
trait String => JsonSelector
class Object
trait Matchable
class Any

Attributes

Inherited from:
JsonMatchersLowImplicits (hidden)
Supertypes
trait ToJsonSelector[Boolean]
class Object
trait Matchable
class Any

Attributes

Inherited from:
JsonMatchersLowImplicits (hidden)
Supertypes
trait ToJsonSelector[Double]
class Object
trait Matchable
class Any

Attributes

Inherited from:
JsonMatchersLowImplicits (hidden)
Supertypes
trait ToJsonSelector[Int]
class Object
trait Matchable
class Any
object given_ToJsonSelector_Matcher extends ToJsonSelector[Matcher[String]]

Attributes

Inherited from:
JsonMatchersImplicits (hidden)
Supertypes
trait ToJsonSelector[Matcher[String]]
class Object
trait Matchable
class Any

Attributes

Inherited from:
JsonMatchersImplicits (hidden)
Supertypes
trait ToJsonSelector[Regex]
class Object
trait Matchable
class Any

Attributes

Inherited from:
JsonMatchersLowImplicits (hidden)
Supertypes
trait ToJsonSelector[String]
class Object
trait Matchable
class Any

Value members

Inherited methods

Attributes

Inherited from:
JsonMatchers

Attributes

Inherited from:
JsonMatchers
def /#(n: Int): JsonSelectorMatcher

Attributes

Inherited from:
JsonMatchers
def beJsonNull: Matcher[JsonType]

Attributes

Inherited from:
JsonMatchers
protected def checkResultFailure(r: => Result): Result

this method can be overridden to throw exceptions when checking a result

this method can be overridden to throw exceptions when checking a result

Attributes

Inherited from:
ResultChecks
def createExpectable[T](t: => T, alias: String => String): Expectable[T]

Attributes

Returns

an Expectable with a description function

Inherited from:
ExpectationsCreation
def createExpectable[T](t: => T, alias: => String): Expectable[T]

Attributes

Returns

an Expectable with a description

Inherited from:
ExpectationsCreation
def createExpectable[T](t: => T): Expectable[T]

Attributes

Returns

an Expectable

Inherited from:
ExpectationsCreation
def createExpectable[T](t: => T, alias: Option[String => String]): Expectable[T]

Attributes

Returns

an Expectable with a description function

Inherited from:
ExpectationsCreation
def createExpectableWithShowAs[T](t: => T, showAs: => String): Expectable[T]

Attributes

Returns

an Expectable with a function to show the element T

Inherited from:
ExpectationsCreation
def have(m: Matcher[JsonType]): JsonMatcher

Attributes

Inherited from:
JsonMatchers
protected def mapResult(r: Result): Result

this method can be overridden to intercept a Result and modify it. It is used for example to set a stacktrace providing the location of a failure

this method can be overridden to intercept a Result and modify it. It is used for example to set a stacktrace providing the location of a failure

Attributes

Inherited from:
ResultChecks
protected def sandboxResult(r: => Result): Result

Attributes

Returns

the result without any side-effects

Inherited from:
ResultChecks
protected def setStacktrace(m: Result): Result

this method can be overridden to avoid filling-in a stacktrace indicating the location of the result

this method can be overridden to avoid filling-in a stacktrace indicating the location of the result

Attributes

Inherited from:
MatchResultStackTrace
def theBlock(t: => Nothing): Expectable[Nothing]

Attributes

Inherited from:
ExpectationsCreation
def theValue[T](t: => T): Expectable[T]

Attributes

Inherited from:
ExpectationsCreation

Inherited fields

val anyValue: Matcher[Any]

Attributes

Inherited from:
JsonSelectors

Givens

Inherited givens

Attributes

Inherited from:
JsonMatchersImplicits (hidden)

Attributes

Inherited from:
JsonMatchersImplicits (hidden)

Attributes

Inherited from:
JsonMatchersImplicits (hidden)
given given_Conversion_K_V_JsonPairSelector[K, V](using evidence$1: ToJsonSelector[K], evidence$2: ToJsonSelector[V]): given_Conversion_K_V_JsonPairSelector[K, V]

Attributes

Inherited from:
JsonMatchersImplicits (hidden)
given given_Conversion_M_JsonSelector[M <: Matcher[String]]: given_Conversion_M_JsonSelector[M]

datatype to specify how json values must be checked

datatype to specify how json values must be checked

Attributes

Inherited from:
JsonMatchersImplicits (hidden)

Attributes

Inherited from:
JsonMatchersImplicits (hidden)

Attributes

Inherited from:
JsonMatchersImplicits (hidden)

Attributes

Inherited from:
JsonMatchersLowImplicits (hidden)

Attributes

Inherited from:
JsonMatchersLowImplicits (hidden)

Attributes

Inherited from:
JsonMatchersLowImplicits (hidden)
given given_ToJsonSelector_M[M <: Matcher[String]]: given_ToJsonSelector_M[M]

Attributes

Inherited from:
JsonMatchersImplicits (hidden)

Attributes

Inherited from:
JsonMatchersImplicits (hidden)

Attributes

Inherited from:
JsonMatchersImplicits (hidden)

Attributes

Inherited from:
JsonMatchersLowImplicits (hidden)

Extensions

Inherited extensions

extension [T](description: String)(using not: NotGiven[NoExpectationsDescription])(using evidence$1: AsResult[T])
def ==>(result: => T): Result

Attributes

Inherited from:
ExpectationsDescription
extension [T](description: String)(using not: NotGiven[NoExpectationsDescription])(using evidence$2: AsResult[T])
def <==>(result: => T): Result

Attributes

Inherited from:
ExpectationsDescription
extension [T](t: => T)(using not: NotGiven[NoTypedEqual])(using evidence$2: Diffable[T])
def !==(other: => T): Result

! equality matcher on Expectables

! equality matcher on Expectables

Attributes

Inherited from:
TypedEqual
extension [T](t: => T)(using not: NotGiven[NoTypedEqual])(using evidence$1: Diffable[T])
def ===(other: => T): Result

equality matcher on Expectables

equality matcher on Expectables

Attributes

Inherited from:
TypedEqual
extension [T](value: => T)(using not: NotGiven[NoValueDescription])
infix def aka(alias: => String): Expectable[T]

Attributes

Returns

an expectable with an alias description

Inherited from:
ExpectationsDescription
infix def aka: Expectable[T]

Attributes

Returns

an expectable with its toString method as an alias description this is useful to preserve the original value when the matcher using it is adapting the value

Inherited from:
ExpectationsDescription
infix def as(alias: String => String): Expectable[T]

Attributes

Returns

an expectable with an alias description, after the value string

Inherited from:
ExpectationsDescription
infix def post(alias: => String): Expectable[T]

Attributes

Returns

an expectable with an alias description, after the value string

Inherited from:
ExpectationsDescription
infix def showAs(show: T => String): Expectable[T]

Attributes

Returns

an expectable with a function to show the element T

Inherited from:
ExpectationsDescription
extension [T](value: => T)(using not: NotGiven[NoValueDescription], show: T => String)
infix def showAs: Expectable[T]

Attributes

Returns

an expectable with a function to show the element T

Inherited from:
ExpectationsDescription