Verify.NodaTime
April 9, 2026 ยท View on GitHub
Adds Verify support for scrubbing NodaTime values.
See Milestones for release notes.
Sponsors
Entity Framework Extensions
Entity Framework Extensions is a major sponsor and is proud to contribute to the development this project.
Developed using JetBrains IDEs
NuGet
Usage
[ModuleInitializer]
public static void Init() =>
VerifyNodaTime.Initialize();
Then all Noda date/times will be scrubbed:
[Fact]
public Task ScrubbingExample()
{
var target = new Person
{
Dob = LocalDateTime.FromDateTime(DateTime.Now)
};
return Verify(target);
}
Resulting in:
{
Dob: LocalDateTime_1
}
Disable scrubbing
To disable scrubbing use DontScrubNodaTimes:
[Fact]
public Task DisableExample()
{
var target = new Person
{
Dob = LocalDateTime.FromDateTime(new(2010, 2, 10))
};
return Verify(target)
.DontScrubNodaTimes();
}
Resulting in:
{
Dob: DateTimeOffset_1
}
To disable scrubbing globally use VerifyNodaTime.DontScrub:
[ModuleInitializer]
public static void Init()
{
VerifyNodaTime.DontScrub();
VerifyNodaTime.Initialize();
}
Icon
Clock designed by Mooyai Khomsun Chaiwong from The Noun Project.

