TrialsScaffolding

com.sageserpent.americium.TrialsScaffolding
See theTrialsScaffolding companion object
trait TrialsScaffolding[+Case] extends TrialsFactoring[Case]

Attributes

Companion
object
Graph
Supertypes
trait TrialsFactoring[Case]
class Object
trait Matchable
class Any
Known subtypes
trait Trials[Case]
class TrialsImplementation[Case]
trait Tuple2Trials[Case1, Case2]
class Tuple2Trials[Case1, Case2]
trait Tuple3Trials[Case1, Case2, Case3]
class Tuple3Trials[Case1, Case2, Case3]
trait Tuple4Trials[Case1, Case2, Case3, Case4]
class Tuple4Trials[Case1, Case2, Case3, Case4]
Show all

Members list

Type members

Inherited classlikes

abstract class TrialException(cause: Throwable) extends RuntimeException

Attributes

Inherited from:
TrialsFactoring
Supertypes
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Types

Value members

Abstract methods

def trials: Trials[Case]

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.

Attributes

Returns

The equivalent Trials instance.

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.

Attributes

Returns

An instance of SupplyToSyntax with the limit configured.

def withStrategy(casesLimitStrategyFactory: CaseSupplyCycle => CasesLimitStrategy, complexityLimit: Int, shrinkageAttemptsLimit: Int, shrinkageStop: () => Case): 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.

Attributes

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.

Deprecated methods

def withLimits(casesLimit: Int, complexityLimit: Int, shrinkageAttemptsLimit: Int, shrinkageStop: () => Case): SupplySyntaxType

Attributes

Deprecated
true
def withRecipe(recipe: String): SupplySyntaxType

Attributes

Deprecated
true

Inherited methods

def reproduce(recipe: String): Case

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.

Attributes

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