Class

org.scalatest.prop.GeneratorDrivenPropertyChecks

ConfiguredPropertyCheck

Related Doc: package GeneratorDrivenPropertyChecks

Permalink

class ConfiguredPropertyCheck extends AnyRef

Performs a configured property checks by applying property check functions passed to its apply methods to arguments supplied by implicitly passed generators, modifying the values in the PropertyGenConfig object passed implicitly to its apply methods with parameter values passed to its constructor.

Instances of this class are returned by trait GeneratorDrivenPropertyChecks forAll method that accepts a variable length argument list of PropertyCheckConfigParam objects. Thus it is used with functions of all six arities. Here are some examples:

forAll (minSize(1), maxSize(10)) { (a: String) =>
  a.length should equal ((a).length)
}

forAll (minSize(1), maxSize(10)) { (a: String, b: String) =>
  a.length + b.length should equal ((a + b).length)
}

forAll (minSize(1), maxSize(10)) { (a: String, b: String, c: String) =>
  a.length + b.length + c.length should equal ((a + b + c).length)
}

forAll (minSize(1), maxSize(10)) { (a: String, b: String, c: String, d: String) =>
  a.length + b.length + c.length + d.length should equal ((a + b + c + d).length)
}

forAll (minSize(1), maxSize(10)) { (a: String, b: String, c: String, d: String, e: String) =>
  a.length + b.length + c.length + d.length + e.length should equal ((a + b + c + d + e).length)
}

forAll (minSize(1), maxSize(10)) { (a: String, b: String, c: String, d: String, e: String, f: String) =>
  a.length + b.length + c.length + d.length + e.length + f.length should equal ((a + b + c + d + e + f).length)
}

In the first example above, the ConfiguredPropertyCheck object is returned by:

forAll (minSize(1), maxSize(10))

The code that follows is an invocation of one of the ConfiguredPropertyCheck apply methods:

{ (a: String) =>
  a.length should equal ((a).length)
}

Source
GeneratorDrivenPropertyChecks.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ConfiguredPropertyCheck
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ConfiguredPropertyCheck(configParams: Seq[GeneratorDrivenPropertyChecks.PropertyCheckConfigParam])

    Permalink

    configParams

    a variable length list of PropertyCheckConfigParam objects that should override corresponding values in the PropertyCheckConfiguration implicitly passed to the apply methods of instances of this class.

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. def apply[A, B, C, D, E, F](fun: (A, B, C, D, E, F) ⇒ Assertion)(implicit config: GeneratorDrivenPropertyChecks.PropertyCheckConfigurable, arbA: Arbitrary[A], shrA: Shrink[A], arbB: Arbitrary[B], shrB: Shrink[B], arbC: Arbitrary[C], shrC: Shrink[C], arbD: Arbitrary[D], shrD: Shrink[D], arbE: Arbitrary[E], shrE: Shrink[E], arbF: Arbitrary[F], shrF: Shrink[F]): Assertion

    Permalink

    Performs a property check by applying the specified property check function to arguments supplied by implicitly passed generators, modifying the values in the implicitly passed PropertyGenConfig object with parameter values passed to this object's constructor.

    Performs a property check by applying the specified property check function to arguments supplied by implicitly passed generators, modifying the values in the implicitly passed PropertyGenConfig object with parameter values passed to this object's constructor.

    Here's an example:

    forAll (minSize(1), maxSize(10)) { (a: String, b: String, c: String, d: String, e: String, f: String) =>
      a.length + b.length + c.length + d.length + e.length + f.length should equal ((a + b + c + d + e + f).length)
    }
    

    fun

    the property check function to apply to the generated arguments

  5. def apply[A, B, C, D, E](fun: (A, B, C, D, E) ⇒ Assertion)(implicit config: GeneratorDrivenPropertyChecks.PropertyCheckConfigurable, arbA: Arbitrary[A], shrA: Shrink[A], arbB: Arbitrary[B], shrB: Shrink[B], arbC: Arbitrary[C], shrC: Shrink[C], arbD: Arbitrary[D], shrD: Shrink[D], arbE: Arbitrary[E], shrE: Shrink[E]): Assertion

    Permalink

    Performs a property check by applying the specified property check function to arguments supplied by implicitly passed generators, modifying the values in the implicitly passed PropertyGenConfig object with parameter values passed to this object's constructor.

    Performs a property check by applying the specified property check function to arguments supplied by implicitly passed generators, modifying the values in the implicitly passed PropertyGenConfig object with parameter values passed to this object's constructor.

    Here's an example:

    forAll (minSize(1), maxSize(10)) { (a: String, b: String, c: String, d: String, e: String) =>
      a.length + b.length + c.length + d.length + e.length should equal ((a + b + c + d + e).length)
    }
    

    fun

    the property check function to apply to the generated arguments

  6. def apply[A, B, C, D](fun: (A, B, C, D) ⇒ Assertion)(implicit config: GeneratorDrivenPropertyChecks.PropertyCheckConfigurable, arbA: Arbitrary[A], shrA: Shrink[A], arbB: Arbitrary[B], shrB: Shrink[B], arbC: Arbitrary[C], shrC: Shrink[C], arbD: Arbitrary[D], shrD: Shrink[D]): Assertion

    Permalink

    Performs a property check by applying the specified property check function to arguments supplied by implicitly passed generators, modifying the values in the implicitly passed PropertyGenConfig object with parameter values passed to this object's constructor.

    Performs a property check by applying the specified property check function to arguments supplied by implicitly passed generators, modifying the values in the implicitly passed PropertyGenConfig object with parameter values passed to this object's constructor.

    Here's an example:

    forAll (minSize(1), maxSize(10)) { (a: String, b: String, c: String, d: String) =>
      a.length + b.length + c.length + d.length should equal ((a + b + c + d).length)
    }
    

    fun

    the property check function to apply to the generated arguments

  7. def apply[A, B, C](fun: (A, B, C) ⇒ Assertion)(implicit config: GeneratorDrivenPropertyChecks.PropertyCheckConfigurable, arbA: Arbitrary[A], shrA: Shrink[A], arbB: Arbitrary[B], shrB: Shrink[B], arbC: Arbitrary[C], shrC: Shrink[C]): Assertion

    Permalink

    Performs a property check by applying the specified property check function to arguments supplied by implicitly passed generators, modifying the values in the implicitly passed PropertyGenConfig object with parameter values passed to this object's constructor.

    Performs a property check by applying the specified property check function to arguments supplied by implicitly passed generators, modifying the values in the implicitly passed PropertyGenConfig object with parameter values passed to this object's constructor.

    Here's an example:

    forAll (minSize(1), maxSize(10)) { (a: String, b: String, c: String) =>
      a.length + b.length + c.length should equal ((a + b + c).length)
    }
    

    fun

    the property check function to apply to the generated arguments

  8. def apply[A, B](fun: (A, B) ⇒ Assertion)(implicit config: GeneratorDrivenPropertyChecks.PropertyCheckConfigurable, arbA: Arbitrary[A], shrA: Shrink[A], arbB: Arbitrary[B], shrB: Shrink[B]): Assertion

    Permalink

    Performs a property check by applying the specified property check function to arguments supplied by implicitly passed generators, modifying the values in the implicitly passed PropertyGenConfig object with parameter values passed to this object's constructor.

    Performs a property check by applying the specified property check function to arguments supplied by implicitly passed generators, modifying the values in the implicitly passed PropertyGenConfig object with parameter values passed to this object's constructor.

    Here's an example:

    forAll (minSize(1), maxSize(10)) { (a: String, b: String) =>
      a.length + b.length should equal ((a + b).length)
    }
    

    fun

    the property check function to apply to the generated arguments

  9. def apply[A](fun: (A) ⇒ Assertion)(implicit config: GeneratorDrivenPropertyChecks.PropertyCheckConfigurable, arbA: Arbitrary[A], shrA: Shrink[A]): Assertion

    Permalink

    Performs a property check by applying the specified property check function to arguments supplied by implicitly passed generators, modifying the values in the implicitly passed PropertyGenConfig object with parameter values passed to this object's constructor.

    Performs a property check by applying the specified property check function to arguments supplied by implicitly passed generators, modifying the values in the implicitly passed PropertyGenConfig object with parameter values passed to this object's constructor.

    Here's an example:

    forAll (minSize(1), maxSize(10)) { (a: String) =>
      a.length should equal ((a).length)
    }
    

    fun

    the property check function to apply to the generated arguments

  10. final def asInstanceOf[T0]: T0

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped