Skip to content

Latest commit

 

History

1,413 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodaTime.Bogus

Build status NuGet Status

Add support for NodaTime to Bogus.

See Milestones for release notes.

NuGet package

https://nuget.org/packages/NodaTime.Bogus/

Usage

This project extends Faker with .Noda().

var faker = new Faker<Target>()
    .RuleFor(u => u.Property1, (f, _) => f.Noda().Duration())
    .RuleFor(u => u.Property2, (f, _) => f.Noda().Instant.Recent())
    .RuleFor(u => u.Property3, (f, _) => f.Noda().ZonedDateTime.Future());

var target = faker.Generate();
Debug.WriteLine(target.Property1);
Debug.WriteLine(target.Property2);
Debug.WriteLine(target.Property3);

snippet source | anchor

There are several top level generators:

There are several nested generators that provide Past, Soon, Future, Between, and Recent semantics:

Icon

Calendar designed by Monster Critic from The Noun Project.

About

Add support for NodaTime to Bogus.

Resources

Code of conduct

Stars

19 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages