# Verify.NodaTime
[![Build status](https://ci.appveyor.com/api/projects/status/ej794va900x9257f?svg=true)](https://ci.appveyor.com/project/SimonCropp/Verify-NodaTime)
[![NuGet Status](https://img.shields.io/nuget/v/Verify.NodaTime.svg)](https://www.nuget.org/packages/Verify.NodaTime/)
Adds [Verify](https://github.com/VerifyTests/Verify) support for scrubbing [NodaTime](https://nodatime.org/) values.
## NuGet package
https://nuget.org/packages/Verify.NodaTime/
## Usage
Before any tests have run call:
```
VerifyNodaTime.Enable();
```
Then all Noda date/times will be scrubbed:
```cs
[Fact]
public Task ScrubbingExample()
{
var target = new Person
{
Dob = LocalDateTime.FromDateTime(DateTime.Now)
};
return Verifier.Verify(target);
}
```
snippet source | anchor
Resulting in:
```txt
{
Dob: LocalDateTime_1
}
```
snippet source | anchor
To disable scrubbing use `DontScrubNodaTimes`:
```cs
[Fact]
public Task DisableExample()
{
var target = new Person
{
Dob = LocalDateTime.FromDateTime(new DateTime(2010, 2, 10))
};
return Verifier.Verify(target)
.DontScrubNodaTimes();
}
```
snippet source | anchor
Resulting in:
```txt
{
Dob: 2010-02-10T00:00:00
}
```
snippet source | anchor
## Icon
[Clock](https://thenounproject.com/term/clock/731041/) designed by [Mooyai Khomsun Chaiwong](https://thenounproject.com/mooyai/) from [The Noun Project](https://thenounproject.com/).