I want to create with Fixture a list of N objects.
I know I can do it with:
List<Person> persons = new List<Person>();
for (int i = 0; i < numberOfPersons; i++)
{
Person person = fixture.Build<Person>().Create();
persons.Add(person);
}
Is there any way I can use the CreateMany()
method or some other method in order to avoid the loop?