JsonMatchers

Matchers for Json expressions (entered as strings)

Companion:
object
trait Expectations
trait ExpectationsDescription
trait TypedEqual
trait ExpectationsCreation
trait MatchResultStackTrace
class Object
trait Matchable
class Any
object JsonMatchers.type

Type members

Inherited classlikes

case object Deep extends JsonQueryType
Inherited from:
JsonSelectors
class Descriptible[T](value: => T)
class ExpectationDescription(description: String)
case object First extends JsonQueryType
Inherited from:
JsonSelectors
case class JsonDoubleSelector(d: Double) extends JsonValueSelector
Inherited from:
JsonSelectors
case class JsonEqualValueSelector(v: Any) extends JsonValueSelector
Inherited from:
JsonSelectors
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

Inherited from:
JsonBaseMatchers
case class JsonIndexSelector(n: Int) extends JsonSelector
Inherited from:
JsonSelectors
case class JsonIntSelector(n: Int) extends JsonValueSelector
Inherited from:
JsonSelectors
abstract class JsonMatcher extends Matcher[String]
Inherited from:
JsonBaseMatchers
Inherited from:
JsonBaseMatchers
case class JsonMatcherSelector(m: Matcher[String]) extends JsonValueSelector
Inherited from:
JsonSelectors
Inherited from:
JsonSelectors
case class JsonQuery(query: JsonQueryType, selector: JsonSelector)
Inherited from:
JsonSelectors
sealed trait JsonQueryType
Inherited from:
JsonSelectors
case class JsonRegexSelector(r: Regex) extends JsonValueSelector
Inherited from:
JsonSelectors
sealed trait JsonSelector
Inherited from:
JsonSelectors
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

Inherited from:
JsonBaseMatchers
case class JsonValueOrKeySelector(selector: JsonSelector) extends JsonSelector
Inherited from:
JsonSelectors
Inherited from:
JsonSelectors
class NotMatcherJson(result: NotMatcher[Any])
Inherited from:
JsonBaseBeHaveMatchers
class TypedEqualExpectation[T](t: => T)
Inherited from:
TypedEqual

Value members

Inherited methods

Inherited from:
JsonBaseMatchers
Inherited from:
JsonBaseMatchers
def /#(n: Int): JsonSelectorMatcher
Inherited from:
JsonBaseMatchers
def anyValue: Matcher[String]
Inherited from:
JsonSelectors
def be: NeutralMatcher[Any]
Inherited from:
BeHaveMatchers
def beJsonNull: Matcher[JsonType]
Inherited from:
JsonBaseMatchers
protected def checkFailure[T](m: MatchResult[T]): MatchResult[T]

this method can be overridden to throw exceptions when checking the match result

this method can be overridden to throw exceptions when checking the match result

Inherited from:
ExpectationsCreation
protected def checkMatchResultFailure[T](m: MatchResult[T]): MatchResult[T]

this method can be overridden to throw exceptions when checking the match result

this method can be overridden to throw exceptions when checking the match result

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

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

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

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

an Expectable with a description function

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

an Expectable with a description function

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

an Expectable with a description

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

an Expectable

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

an Expectable with a function to show the element T

Inherited from:
ExpectationsCreation
def have: NeutralMatcher[Any]
Inherited from:
BeHaveMatchers
def have(m: Matcher[JsonType]): JsonMatcher
Inherited from:
JsonBaseMatchers
protected def mapMatchResult[T](m: MatchResult[T]): MatchResult[T]

this method can be overridden to intercept a MatchResult and change its message before it is thrown

this method can be overridden to intercept a MatchResult and change its message before it is thrown

Inherited from:
ExpectationsCreation
def not: NotMatcher[Any]
Inherited from:
BeHaveMatchers
protected def sandboxMatchResult[T](mr: => MatchResult[T]): MatchResult[T]
Returns:

the match result without any side-effects

Inherited from:
ExpectationsCreation
protected def setStacktrace[T](m: MatchResult[T]): MatchResult[T]

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

Inherited from:
MatchResultStackTrace

Implicits

Inherited implicits

implicit def booleanToJsonSelector: ToJsonSelector[Boolean]
Inherited from:
JsonMatchersLowImplicits
implicit def describe[T](t: => T): Descriptible[T]

describe a value with the aka method

describe a value with the aka method

Inherited from:
ExpectationsDescription
implicit def describeExpectation(description: String): ExpectationDescription
Inherited from:
ExpectationsDescription
implicit def doubleToJsonSelector: ToJsonSelector[Double]
Inherited from:
JsonMatchersLowImplicits
Inherited from:
JsonMatchersLowImplicits
implicit def matcherToJsonSelector[M <: Matcher[String]]: ToJsonSelector[M]
Inherited from:
JsonMatchersImplicits
implicit def regexToJsonSelector: ToJsonSelector[Regex]
Inherited from:
JsonMatchersImplicits
implicit def stringToJsonSelector: ToJsonSelector[String]
Inherited from:
JsonMatchersLowImplicits
Inherited from:
JsonMatchersImplicits
Inherited from:
JsonMatchersImplicits
Inherited from:
JsonMatchersImplicits
Inherited from:
JsonMatchersImplicits
implicit def toJsonValueSelectorRegex(r: Regex): JsonSelector
Inherited from:
JsonMatchersImplicits
implicit def toJsonValueSelectorStringMatcher[M <: Matcher[String]](m: M): JsonSelector

datatype to specify how json values must be checked

datatype to specify how json values must be checked

Inherited from:
JsonMatchersImplicits
Inherited from:
JsonMatchersImplicits
implicit def toNotMatcherJson(result: NotMatcher[Any]): NotMatcherJson
Inherited from:
JsonBaseBeHaveMatchers
implicit def typedEqualExpectation[T](t: => T): TypedEqualExpectation[T]

A value can be tested against another with the === operator. It is equivalent to writing a must_== b

A value can be tested against another with the === operator. It is equivalent to writing a must_== b

Inherited from:
TypedEqual