Class FlatMappedGenerator<TSource, TResult>
- Namespace
- Hegel
- Assembly
- Hegel.dll
A generator that draws a value and then from the generator chosen for it.
public sealed class FlatMappedGenerator<TSource, TResult> : PrintableGenerator<TResult>
Type Parameters
TSourceTResult
- Inheritance
-
Generator<TResult>PrintableGenerator<TResult>FlatMappedGenerator<TSource, TResult>
- Inherited Members
Properties
Label
The span label the engine files this generator's draws under. Defaults to a label derived from the class's full name.
public override ulong Label { get; }
Property Value
Methods
DoDraw(TestCase)
Draw one value. Called inside a span labelled Label: draw from another generator through DrawSilent<T>(Generator<T>), which opens its span, rather than by calling its hook.
protected override TResult DoDraw(TestCase tc)
Parameters
tcTestCase
Returns
- TResult
DoDrawAndPrint(TestCase, Printer)
Draw one value, printing it to printer (which may be Noop).
Draw its parts through DrawAndPrint<T>(Generator<T>, Printer).
protected override TResult DoDrawAndPrint(TestCase tc, Printer printer)
Parameters
Returns
- TResult