Interface IGenerationContext
- Namespace
- Conjecture.Core
- Assembly
- Conjecture.Core.dll
Provides imperative generation and assumption operations within a Strategy.Compose body.
public interface IGenerationContext
Methods
Assume(bool)
Rejects the current example if condition is false.
void Assume(bool condition)
Parameters
conditionbool
Generate<T>(Strategy<T>)
Generates a value from strategy.
T Generate<T>(Strategy<T> strategy)
Parameters
strategyStrategy<T>
Returns
- T
Type Parameters
T
Target(double, string)
Records a numeric observation to guide targeted generation.
void Target(double observation, string label = "default")