Tuple2Trials

trait Tuple2Trials[+Case1, +Case2] extends TrialsScaffolding[(Case1, Case2)]
trait TrialsScaffolding[(Case1, Case2)]
trait TrialsFactoring[(Case1, Case2)]
class Object
trait Matchable
class Any
class Tuple2Trials[Case1, Case2]

Type members

Inherited classlikes

abstract class TrialException(cause: Throwable) extends RuntimeException
Inherited from:
TrialsFactoring

Types

override type SupplySyntaxType <: SupplyToSyntaxTuple2[Case1, Case2]

Value members

Abstract methods

def and[Case3](thirdTrials: Trials[Case3]): Tuple3Trials[Case1, Case2, Case3]

Inherited methods

def reproduce(recipe: String): (Case1, Case2)

Reproduce a specific case in a repeatable fashion, based on a recipe.

Reproduce a specific case in a repeatable fashion, based on a recipe.

Value parameters:
recipe

This encodes a specific case and will only be understood by the same value of trials instance that was used to obtain it.

Returns:

The specific Case denoted by the recipe.

Throws:
RuntimeException

if the recipe does not correspond to the receiver, either due to it being created by a different flavour of trials instance or subsequent code changes.

Inherited from:
TrialsFactoring
def trials: Trials[(Case1, Case2)]

Use this to lose any specialised supply syntax and go back to the regular Trials API. The motivation for this is when the and combinator is used to glue together several trials instances, but we want to treat the result as a plain trials of tuples, rather than calling Trials.withLimits etc there and then.

Use this to lose any specialised supply syntax and go back to the regular Trials API. The motivation for this is when the and combinator is used to glue together several trials instances, but we want to treat the result as a plain trials of tuples, rather than calling Trials.withLimits etc there and then.

Returns:

The equivalent Trials instance.

Inherited from:
TrialsScaffolding
def withLimit(limit: Int): SupplySyntaxType

Fluent syntax for configuring a limit to the number of cases supplied to a consumer.

Fluent syntax for configuring a limit to the number of cases supplied to a consumer.

Value parameters:
limit

The maximum number of cases that can be supplied - note that this is no guarantee that so many cases will be supplied, it is simply a limit.

Returns:

An instance of SupplyToSyntax with the limit configured.

Inherited from:
TrialsScaffolding
def withStrategy(casesLimitStrategyFactory: CaseSupplyCycle => CasesLimitStrategy, complexityLimit: Int, shrinkageAttemptsLimit: Int, shrinkageStop: () => (Case1, Case2)): SupplySyntaxType

Fluent syntax for configuring a limit strategy for the number of cases supplied to a consumer.

Fluent syntax for configuring a limit strategy for the number of cases supplied to a consumer.

Value parameters:
casesLimitStrategyFactory

A factory method that should produce a fresh instance of a CasesLimitStrategy on each call.

Returns:

An instance of SupplyToSyntax with the strategy configured.

Note:

The factory casesLimitStrategyFactory takes an argument of CaseSupplyCycle; this can be used to dynamically configure the strategy depending on which cycle the strategy is intended for, or simply disregarded if a one-size-fits-all approach is desired.

Inherited from:
TrialsScaffolding

Deprecated and Inherited methods

@deprecated("Use `withLimit` followed by calls to `withComplexityLimit`, `withShrinkageAttemptsLimit` and `withShrinkageStop`.")
def withLimits(casesLimit: Int, complexityLimit: Int, shrinkageAttemptsLimit: Int, shrinkageStop: () => (Case1, Case2)): SupplySyntaxType
Deprecated
Inherited from:
TrialsScaffolding
@deprecated("Use the JVM system property JavaPropertyNames.recipeHashJavaProperty() - `trials.recipeHash` instead to force existing tests written using `withLimit` or `withStrategy` to pick up the recipe. This has the advantage of being a temporary measure for debugging that doesn\'t require test code changes.")
def withRecipe(recipe: String): SupplySyntaxType
Deprecated
Inherited from:
TrialsScaffolding