Trait/Object

org.scalawebtest.json

JsonGauge

Related Docs: object JsonGauge | package json

Permalink

trait JsonGauge extends AnyRef

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"}"""
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsonGauge
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait GaugeType extends AnyRef

    Permalink

    base trait for the marker objects, which are used to select the behavior of the org.scalawebtest.json.Gauge

  2. implicit class JsonGaugeFromJsLookup extends JsonGaugeFromPlayJson

    Permalink

    Implicit class, to build a Gauge from a JsLookupResult

  3. implicit class JsonGaugeFromJsValue extends JsonGaugeFromPlayJson

    Permalink

    Implicit class, to build a Gauge from a JsValue

  4. class JsonGaugeFromPlayJson extends AnyRef

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  16. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  17. object types extends GaugeType

    Permalink

    marker object to build a gauge, which only verifies by type

  18. object typesAndArraySizes extends GaugeType

    Permalink

    marker object to build a gauge, which only verifies by type, but checks array sizes as well

  19. object values extends GaugeType

    Permalink

    marker object to build a gauge, which verifies values

  20. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped