DataForger

Deterministic Generation

Use seeds to get identical data on every run.


Call WithSeed() to make generation reproducible. The same seed and country always produce the same data.

csharp
var customer = DataForger
    .ForCountry(Country.BR)
    .WithSeed(123)
    .Create<Customer>();

// Run it anywhere, any number of times:
// identical customer every time

Why it matters

  • Snapshot tests stay stable across machines
  • Failing CI runs reproduce exactly
  • Seed data survives migrations and rebuilds

Without a seed, DataForger picks a random one — each run gives fresh data.