Class CurrentDateTimeCustomization

Namespace: AutoFixture
Assembly: AutoFixture.dll

A customization that enables DateTime specimens to be based on the current Now value.

public class CurrentDateTimeCustomization : ICustomization

Inheritance

objectCurrentDateTimeCustomization

Implements

ICustomization

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Remarks

When this customization is added to an `IFixture` instance, requests for DateTime specimens will be satisfied by returning the current `Now` value.

This customization reproduces the generation strategy for DateTime specimens used in AutoFixture up to version 2.1.

Constructors

CurrentDateTimeCustomization()

public CurrentDateTimeCustomization()

Methods

Customize(IFixture)

Customizes the specified fixture by adding the Type specific numeric sequence generators.

public void Customize(IFixture fixture)

Parameters

fixture IFixture

The fixture to customize.