Table of Contents

PrimeTime testing packages

PrimeTime ships testing APIs in dedicated packages so production packages can stay focused on runtime clock/timer usage.

Testing package mapping

Choose the testing package that matches your production package:

Production package Testing package Namespace
KZDev.PrimeTime KZDev.PrimeTime.Testing KZDev.PrimeTime
KZDev.SystemClock.PrimeTime KZDev.SystemClock.PrimeTime.Testing KZDev.SystemClock.PrimeTime

The testing packages keep the same namespace family as their production counterparts.

Testing APIs in these packages

Testing-focused contracts and implementations are delivered via the testing packages, including:

  • IPrimeTestClock
  • IPrimeTestTime
  • PrimeTestClock

System Clock stack (BCL / TimeProvider)

Use KZDev.SystemClock.PrimeTime with KZDev.SystemClock.PrimeTime.Testing when your production code stays on TimeProvider and BCL date/time types.

Installation

dotnet add package KZDev.SystemClock.PrimeTime
dotnet add package KZDev.SystemClock.PrimeTime.Testing

Dependency injection for tests

Use extension methods from KZDev.SystemClock.PrimeTime.Testing to replace runtime clock services with virtual time in tests.

Runnable testing examples

Browse the dedicated example pages:

System Clock-specific examples

Cross-track testing examples (both stacks shown side-by-side)

Daylight saving notes

The System Clock testing examples use environment-aware local probes plus virtual-time advancement patterns; the DST page above describes the shape and the host-dependent fallbacks.

Browse from the System Clock track sidebar (Testing API), or open KZDev.SystemClock.PrimeTime.Testing directly.

PrimeTime stack (NodaTime)

Use KZDev.PrimeTime with KZDev.PrimeTime.Testing when your production code uses NodaTime (Instant, Duration, LocalTime, etc.) on IPrimeClock.

Installation

dotnet add package KZDev.PrimeTime
dotnet add package KZDev.PrimeTime.Testing

Dependency injection for tests

Use extension methods from KZDev.PrimeTime.Testing to replace runtime clock services with virtual time in tests.

Runnable testing examples

Browse the dedicated example pages:

PrimeTime-specific examples

Cross-track testing examples (both stacks shown side-by-side)

Daylight saving notes

The PrimeTime testing examples use deterministic zone-based setup (fixed TZDB zones via the NodaTime DateTimeZone constructor of PrimeTestClock) and optionally probe the local environment.

Browse from the PrimeTime track sidebar (Testing API), or open KZDev.PrimeTime.Testing directly.