Trials

com.sageserpent.americium.Trials$
See theTrials companion trait
object Trials

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Trials.type

Members list

Type members

Classlikes

implicit class CharacterTrialsSyntax(val characterTrials: Trials[Char])

Attributes

Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def api: TrialsApi

Start here: this yields a TrialsApi instance that is the gateway to creating various kinds of Trials instances via its factory methods.

Start here: this yields a TrialsApi instance that is the gateway to creating various kinds of Trials instances via its factory methods.

Attributes

Returns

A stateless TrialsApi instance.

Note

All the methods defined in Trials itself are either ways of transforming and building up more complex trials, or for putting them to work by running test code.

def reject(): Unit

Reject the test case that has been supplied to the currently executing trial; this aborts the trial, but more test cases can still be supplied. Like the use of filtration, this approach will interact correctly with the shrinkage mechanism, which is why it is provided.

Reject the test case that has been supplied to the currently executing trial; this aborts the trial, but more test cases can still be supplied. Like the use of filtration, this approach will interact correctly with the shrinkage mechanism, which is why it is provided.

Attributes

Note

This method will abort a trial's execution by throwing a private exception handled by the framework implementation. If it is called outside a trial, then it returns control as a no-operation.

def whenever(guardPrecondition: Boolean)(block: => Unit): Unit

This is an alternative to calling Trials.filter - the idea here is to embed calls to this method in the test itself as an enclosing guard condition prior to executing the core testing code. Usually the guard precondition would involve some check on the supplied case and possibly some other inputs that come from elsewhere. Like the use of filtration, this approach will interact correctly with the shrinkage mechanism, which is why it is provided.

This is an alternative to calling Trials.filter - the idea here is to embed calls to this method in the test itself as an enclosing guard condition prior to executing the core testing code. Usually the guard precondition would involve some check on the supplied case and possibly some other inputs that come from elsewhere. Like the use of filtration, this approach will interact correctly with the shrinkage mechanism, which is why it is provided.

Value parameters

block

The core testing code, lazily evaluated.

guardPrecondition

A precondition that must be satisfied to run the test code.

Attributes

Implicits

Implicits

final implicit def CharacterTrialsSyntax(characterTrials: Trials[Char]): CharacterTrialsSyntax
implicit val functorFilterInstance: FunctorFilter[Trials]
implicit val monadInstance: Monad[Trials]