ConfiguredPropertyCheck

org.scalatest.prop.GeneratorDrivenPropertyChecks.ConfiguredPropertyCheck

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), sizeRange(9)) { (a: String) =>
 a.length should equal ((a).length)
}

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

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

forAll (minSize(1), sizeRange(9)) { (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), sizeRange(9)) { (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), sizeRange(9)) { (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), sizeRange(9))

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

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

Value parameters

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.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def apply[A, ASSERTION](fun: A => ASSERTION)(implicit config: PropertyCheckConfiguration, genA: Generator[A], asserting: PropCheckerAsserting[ASSERTION], prettifier: Prettifier, pos: Position): Result

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 PropertyCheckConfiguration 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 PropertyCheckConfiguration object with parameter values passed to this object's constructor.

Here's an example:

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

Value parameters

fun

the property check function to apply to the generated arguments

Attributes

def apply[A, B, ASSERTION](fun: (A, B) => ASSERTION)(implicit config: PropertyCheckConfiguration, genA: Generator[A], genB: Generator[B], asserting: PropCheckerAsserting[ASSERTION], prettifier: Prettifier, pos: Position): Result

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 PropertyCheckConfiguration 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 PropertyCheckConfiguration object with parameter values passed to this object's constructor.

Here's an example:

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

Value parameters

fun

the property check function to apply to the generated arguments

Attributes

def apply[A, B, C, ASSERTION](fun: (A, B, C) => ASSERTION)(implicit config: PropertyCheckConfiguration, genA: Generator[A], genB: Generator[B], genC: Generator[C], asserting: PropCheckerAsserting[ASSERTION], prettifier: Prettifier, pos: Position): Result

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 PropertyCheckConfiguration 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 PropertyCheckConfiguration object with parameter values passed to this object's constructor.

Here's an example:

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

Value parameters

fun

the property check function to apply to the generated arguments

Attributes

def apply[A, B, C, D, ASSERTION](fun: (A, B, C, D) => ASSERTION)(implicit config: PropertyCheckConfiguration, genA: Generator[A], genB: Generator[B], genC: Generator[C], genD: Generator[D], asserting: PropCheckerAsserting[ASSERTION], prettifier: Prettifier, pos: Position): Result

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 PropertyCheckConfiguration 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 PropertyCheckConfiguration object with parameter values passed to this object's constructor.

Here's an example:

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

Value parameters

fun

the property check function to apply to the generated arguments

Attributes

def apply[A, B, C, D, E, ASSERTION](fun: (A, B, C, D, E) => ASSERTION)(implicit config: PropertyCheckConfiguration, genA: Generator[A], genB: Generator[B], genC: Generator[C], genD: Generator[D], genE: Generator[E], asserting: PropCheckerAsserting[ASSERTION], prettifier: Prettifier, pos: Position): Result

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 PropertyCheckConfiguration 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 PropertyCheckConfiguration object with parameter values passed to this object's constructor.

Here's an example:

forAll (minSize(1), sizeRange(9)) { (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)
}

Value parameters

fun

the property check function to apply to the generated arguments

Attributes

def apply[A, B, C, D, E, F, ASSERTION](fun: (A, B, C, D, E, F) => ASSERTION)(implicit config: PropertyCheckConfiguration, genA: Generator[A], genB: Generator[B], genC: Generator[C], genD: Generator[D], genE: Generator[E], genF: Generator[F], asserting: PropCheckerAsserting[ASSERTION], prettifier: Prettifier, pos: Position): Result

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 PropertyCheckConfiguration 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 PropertyCheckConfiguration object with parameter values passed to this object's constructor.

Here's an example:

forAll (minSize(1), sizeRange(9)) { (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)
}

Value parameters

fun

the property check function to apply to the generated arguments

Attributes