Class TimeGenerator
Draws times of day, shrinking toward midnight. See Dates() for how bad arguments are reported.
public sealed class TimeGenerator : ValueGenerator<TimeOnly>
- Inheritance
-
TimeGenerator
- Inherited Members
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 TimeOnly DoDraw(TestCase tc)
Parameters
tcTestCase
Returns
Max(TimeOnly)
No later than max.
public TimeGenerator Max(TimeOnly max)
Parameters
maxTimeOnly
Returns
Exceptions
- ArgumentException
The settings given so far allow no time.
Min(TimeOnly)
No earlier than min.
public TimeGenerator Min(TimeOnly min)
Parameters
minTimeOnly
Returns
Exceptions
- ArgumentException
The settings given so far allow no time.
Precision(Precision)
Only whole numbers of precision since midnight, rather than of ticks.
public TimeGenerator Precision(Precision precision)
Parameters
precisionPrecision
Returns
Exceptions
- ArgumentException
precisionis not a precision, or the settings given so far allow no time.