I am trying to populate some test data with NBuilder (https://github.com/nbuilder/nbuilder).
Here is my class:
public class Person
{
public string Name { get; set; }
public HashSet<int> AssociatedIds { get; set; }
}
I want to generate a list of Persons where they have a random list of ints with a range of 1-50. I can't figure out how to specify that NBuilder should populate the list and how I should set the constraint. Below code leaves the list null.
var people = Builder<Person>.CreateListOfSize(123).Build();
How can I populate the nested hashset with correct range?