Package

org.scalawebtest

json

Permalink

package json

Visibility
  1. Public
  2. All

Type Members

  1. case class Gauge(testee: JsValue, fitValues: Boolean, fitArraySizes: Boolean, ignoreArrayOrder: Boolean) extends Assertions with AppendedClues with Matchers with Product with Serializable

    Permalink

    One should not have to create an instance of Gauge manually.

    One should not have to create an instance of Gauge manually. Use one of the provided Builder. Either JsonGauge or JsonGaugeFromResponse

    testee

    JsValue to be tested with the gauge

    fitValues

    whether the testee is expected to fit the gauge values

    fitArraySizes

    whether the testee is expected to fit the sizes of contained arrays

  2. trait JsonGauge extends AnyRef

    Permalink

    Trait which provides functions to fluently build a org.scalawebtest.json.Gauge.

    Trait which provides functions to fluently build a org.scalawebtest.json.Gauge. Which in turn is used to test if a play.api.libs.json.JsLookupResult or play.api.libs.json.JsValue fits the provided gauge definition.

    Overview

    Start with a play.api.libs.json.JsLookupResult followed by JsonGauge.JsonGaugeFromJsLookup#fits, JsonGauge.JsonGaugeFromJsLookup#fit or JsonGauge.JsonGaugeFromJsLookup#containsElementFitting or play.api.libs.json.JsValue followed by JsonGauge.JsonGaugeFromJsValue#fits, JsonGauge.JsonGaugeFromJsValue#fit or JsonGauge.JsonGaugeFromJsValue#containsElementFitting

    Next you choose the JsonGauge.GaugeType, which has to be one of the following JsonGauge.types$, JsonGauge.typesAndArraySizes$, JsonGauge.values$ or JsonGauge.JsonGaugeFromJsLookup#containsElementFitting

    Last is the definition of the JSON gauge wrapped in JsonGaugeFits#of. The definition has to be a String, which contains a valid JSON document.

    Example

    val dijkstra: JsValue = Json.parse("""{"name": "Dijkstra", "firstName": "Edsger"}""")
    dijkstra fits values of """{"firstName": "Edsger"}"""
  3. case class JsonGaugeArrayContains(gauge: Gauge) extends Assertions with AppendedClues with Matchers with Product with Serializable

    Permalink
  4. case class JsonGaugeFits(gauge: Gauge) extends Product with Serializable

    Permalink
  5. trait JsonGaugeFromResponse extends AnyRef

    Permalink

    Allows to test if the complete response fits the provided org.scalawebtest.json.Gauge definition.

  6. class PrettyPrintBreadcrumb extends AnyRef

    Permalink

Value Members

  1. object JsonGauge extends JsonGauge

    Permalink

    Helper object to provide functions to fluently build a org.scalawebtest.json.Gauge.

    Helper object to provide functions to fluently build a org.scalawebtest.json.Gauge. Which in turn is used to test if a play.api.libs.json.JsLookupResult or play.api.libs.json.JsValue fits the gauge definition.

    Overview

    Import JsonGauge$.JsonGaugeFromJsLookup or JsonGauge$.JsonGaugeFromJsValue, then follow the documentation of the JsonGauge trait.

  2. object JsonGaugeFromResponse extends JsonGaugeFromResponse

    Permalink

Ungrouped