c# - Is it possible with Fixture to create a list of N objects? -
I want to make a list of fixture n objects.
I know that I can accompany it:
list & lt; Person & gt; Person = new list & lt; Person & gt; (); (Person = add; i; lt; number for propriens; i ++) for (person = stability. Build & gt; person & gt; (). Create (); persons.Add (person);} CreateMany () method or some other method to avoid the loop? < P> You can use linq:
list & lt; person & gt; person = numeric Select Category (0, Numberoffs). Select (x => Stability Build. (Build) .toList ();
Comments
Post a Comment