GeneratedParametersClock

The clock date and time sources read "now" from.

Sources that take their bounds as offsets resolve those against the current instant, so with a system clock the values they generate slide with wall-clock time and a failure found today need not reproduce tomorrow. Fixing the clock makes them reproducible.

Properties

Link copied to clipboard

An ISO-8601 instant, for example 2024-01-01T00:00:00Z.

Link copied to clipboard

Zone the fixed clock reports, for the sources that need one to derive a local date or time.

Functions

Link copied to clipboard
fun set(context: ExtensionContext, clock: Clock)

Sets the clock for context and everything below it, which is how a test class or a registered extension overrides what the configuration parameters say.