Class MappedGenerator<TSource, TResult>
- Namespace
- Hegel
- Assembly
- Hegel.dll
A generator whose values are another's, transformed by a function.
public sealed class MappedGenerator<TSource, TResult> : ValueGenerator<TResult>
Type Parameters
TSourceTResult
- Inheritance
-
Generator<TResult>PrintableGenerator<TResult>ValueGenerator<TResult>MappedGenerator<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
PrintAsCall(string)
This generator, printing each value as a call of function on the source's
own printing of its value: Point.FromPolar(1.5, 0.25) rather than the result's repr.
public PrintableGenerator<TResult> PrintAsCall(string function)
Parameters
functionstring
Returns
- PrintableGenerator<TResult>