Using C# Bogus library, I would like to generate completely random objects without enumerating all fields as RuleFor explicitly.
How I could configure my Faker to achieve that?
Using C# Bogus library, I would like to generate completely random objects without enumerating all fields as RuleFor explicitly.
How I could configure my Faker to achieve that?
You can try AutoBogus here: https://github.com/nickdodd79/AutoBogus
AutoBogus is a community extension written by Nick Dodd that "auto magically" creates default rules for properties of your POCO object. You can override those automatic rules that AutoBogus generates, in memory, with specific RuleFor()
rules for unit test that expect specific values.
© 2022 - 2024 — McMap. All rights reserved.
RuleFor
orFaker
syntax. There are alternatives toRuleFor
; see this sample. But this is probably not what you are looking for. – Forefinger