Skip to content

A C# library complementing the Bogus generator by adding auto creation and population capabilities.

License

Notifications You must be signed in to change notification settings

pdevito3/AutoBogus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note This is a fork of AutoBogus by @nickdodd79 to introduce some critical missing features around .NET 6. This was created due to inactivity by Nick, but I'm hoping he comes back to continue supporting the library at some point. It is listed as AutobogusLifesupport on nuget. See below for the modified options

.NET 6 support

This library has been updated to include .NET 6, an updated version of Bogus and auto fakers for DateOnly and TimeOnly structs introduced in .NET 6.

Global WithDateTimeKind configuration

Gloablly configure your date time using one of the DateTimeKind types.

// Configure globally
AutoFaker.Configure(builder =>
{
  builder
    .WithLocale()         	// Configures the locale to use
    .WithDateTimeKind()     // Configures the DateTimeKind to use when generating date and time values. Defaults to `DateTimeKind.Local`.
    .WithRepeatCount()    	// Configures the number of items in a collection
    .WithDataTableRowCount()	// Configures the number of data table rows to generate
    .WithRecursiveDepth() 	// Configures how deep nested types should recurse
    .WithTreeDepth()		// Configures the tree depth of an object graph
    .WithBinder()         	// Configures the binder to use
    .WithFakerHub()       	// Configures a Bogus.Faker instance to be used - instead of a default instance
    .WithSkip()           	// Configures members to be skipped for a type
    .WithOverride();      	// Configures the generator overrides to use - can be called multiple times
});

About

A C# library complementing the Bogus generator by adding auto creation and population capabilities.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%