Features
- Generate intelligent test data based on property type and name
- Automatic discovery of data sources
- Fully customizable property data sources
- Realistic data sources
- Weighted value selection
- Easy fluent API
Download
The DataGenerator library is available on nuget.org via package name DataGenerator
.
To install DataGenerator, run the following command in the Package Manager Console
Install-Package DataGenerator

Configuration
Full class property configuration
Generator.Default.Configure(c => c
.Entity<User>(e =>
{
e.Property(p => p.FirstName).DataSource<FirstNameSource>();
e.Property(p => p.LastName).DataSource<LastNameSource>();
e.Property(p => p.Address1).DataSource<StreetSource>();
e.Property(p => p.City).DataSource<CitySource>();
e.Property(p => p.State).DataSource<StateSource>();
e.Property(p => p.Zip).DataSource<PostalCodeSource>();
e.Property(p => p.Note).DataSource<LoremIpsumSource>();
e.Property(p => p.Password).DataSource<PasswordSource>();
// array of values
e.Property(p => p.Status).DataSource(new[] { Status.New, Status.Verified });
// don't generate
e.Property(p => p.Budget).Ignore();
// static value
e.Property(p => p.IsActive).Value(true);
// delegate value
e.Property(p => p.Created).Value(() => DateTime.Now);
})
);
Example of configuration for generating child classes