You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 82d8def
Browse filesBrowse the repository at this point in the historyBrowse files
Bogus in C#: net10.0, UseSeeding, seeded generator, email test fix (#2300)
* Bogus: net10.0, UseSeeding instead of HasData, Migrate, seeded generator, email test fix
Retarget both projects to net10.0 (Bogus 35.6.5, EF Core 10.0.13, direct System.Security.Cryptography.Pkcs 10.0.13 for the SqlClient advisory; xunit 2.9.3, runner 4.0.1, Test SDK 18.11.0, coverlet 10.1.0).
EmployeeContext seeds through UseSeeding() in OnConfiguring(); OnModelCreating() and HasData() removed.
GetSeededEmployeesFromDb() calls Migrate() instead of EnsureCreated(); the employee generator keeps its Vehicles rule.
Add GenerateRepeatableVehicles(int seed) and a test that the same seed gives the same vehicles.
The email test asserts StartsWith(FirstName): Bogus does not always use the last name.
* Bogus: email test compares against the slugified first name
Bogus slugifies the name when it builds the email (D'angelo becomes Dangelo), so StartsWith(FirstName) failed about 2 to 3 times in 10,000 runs.
The test now asserts StartsWith(Utils.Slugify(FirstName)); 10,000 probe runs give 0 failures.
0 commit comments