nbuilder icon indicating copy to clipboard operation
nbuilder copied to clipboard

Passing GetRandom through builder functions?

Open pjmagee opened this issue 8 years ago • 1 comments

I've always found the GetRandom to be hidden away and not really felt like part of the API that makes NBuilder so special. What about an override of our builder functions where we can pass in an instance of a generator, e.g

Builder<Person>().CreateListOfSize(10)
.With(x => x.Name, (g) => g.FirstName())
.With(x => x.LastName, (g) => g.LastName())
.With(x => x.Age, (g) => g.Birthday())
.With(x => x.PostCode, (g) => g.PostCode())

pjmagee avatar Aug 17 '17 14:08 pjmagee

Nice idea! Totally agree re: GetRandom which was why I created #46

PureKrome avatar Aug 17 '17 23:08 PureKrome