Created
June 2, 2023 01:23
-
-
Save brendan-nobadthing/ab6816a44924095c788d8b1698714550 to your computer and use it in GitHub Desktop.
Bogus code to create test users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private IList<User> BuildUsers() | |
{ | |
var orgFaker = new Faker<User>("en_AU") | |
.RuleFor(x => x.UserId, f => f.Random.Guid()) | |
.RuleFor(x => x.OrgId, f => f.Random.ListItem(Organisations).OrgId) | |
.RuleFor(x => x.FirstName, f => f.Name.FirstName()) | |
.RuleFor(x => x.LastName, f => f.Name.LastName()) | |
.RuleFor(x => x.Address, f => f.Address.FullAddress()) | |
.RuleFor(x => x.State, f => f.Address.State()) | |
.RuleFor(x => x.Dob, f => f.Date.PastDateOnly(70, new DateOnly(2010,1,1))); | |
return orgFaker.Generate(10000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment