TrialsSkeletalImplementation
Value members
Abstract methods
- Definition Classes
- Definition Classes
Concrete methods
- Definition Classes
- Definition Classes
- Definition Classes
- Definition Classes
- Definition Classes
Inherited methods
This is mostly just for implementation purposes, as the Java incarnation com.sageserpent.americium.java.Trials is effectively a wrapper around the Scala incarnation Trials. However, if you want to pull cases via an iterator, this is handy as currently the iterator access is via the Java incarnation.
This is mostly just for implementation purposes, as the Java incarnation com.sageserpent.americium.java.Trials is effectively a wrapper around the Scala incarnation Trials. However, if you want to pull cases via an iterator, this is handy as currently the iterator access is via the Java incarnation.
- Returns:
The Java incarnation com.sageserpent.americium.java.Trials of this instance
- Inherited from:
- Trials
- Returns:
A lifted trials that wraps the underlying cases from this in an Option; the resulting trials also supplies a special case of Option.empty.
- Inherited from:
- Trials
Fluent syntax to allow trials of dissimilar types to be supplied as
alternatives to the same test. In contrast to the TrialsApi.alternate,
the alternatives do not have to conform to the same type; instead here we
can switch in the test between unrelated types using an Either
instance to hold cases supplied from either this trials instance or from
alternativeTrials
.
Fluent syntax to allow trials of dissimilar types to be supplied as
alternatives to the same test. In contrast to the TrialsApi.alternate,
the alternatives do not have to conform to the same type; instead here we
can switch in the test between unrelated types using an Either
instance to hold cases supplied from either this trials instance or from
alternativeTrials
.
- Returns:
[[Either]]
that is populated with either aCase
or with aCase2
.- Inherited from:
- Trials
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
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
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
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
- Inherited from:
- TrialsScaffolding
- Deprecated
- Inherited from:
- TrialsScaffolding