Additional customizations out of the box
Opened this issue · 0 comments
egil commented
I have two customizations that could be useful to include in this library, I think:
- One that changes string generation to make it compatible with Verify (snapshot testing).
- One that ensures
double
s always have a fraction when generated (could add similar ones forfloat
anddecimal
).
// The split of the seed and the GUID makes it possible for Verify to detect the GUID and normalize it across tests.
fixture.Customize<string>(x => x.FromSeed(seed => $"{seed}_{Guid.NewGuid()}"));
// This ensures that double's have fraction part.
fixture.Customize<double>(c => c.FromFactory<int>(i => i * Math.PI));
Should we include these in ATC.Test?