Class ProtoClockExtensions

Namespace
ProtoTest.Core
Assembly
ProtoTest.Core.dll

Configures the run's clock.

public static class ProtoClockExtensions
Inheritance
ProtoClockExtensions
Inherited Members

Methods

ConfigureClock(IProtoHostBuilder, ProtoClock)

Seeds the run's clock. Every test's clock starts where this one points, so a fixed instant makes time-dependent tests deterministic; without this call the run starts at the current real time. Register it while composing the host, before the run starts.

public static IProtoHostBuilder ConfigureClock(this IProtoHostBuilder builder, ProtoClock clock)

Parameters

builder IProtoHostBuilder
clock ProtoClock

Returns

IProtoHostBuilder