public void FastListGeneratesCorrectNumberOfEntries() { var personCount = 17; var people = Angie.FastList <Person>(personCount); Assert.AreEqual(people.Count(), personCount); }
public void FastListDefaultGenerates25Entries() { var people = Angie.FastList <Person>(); Assert.AreEqual(Angie.Defaults.LIST_COUNT, people.Count(), string.Format("Expected {0} but collection contained {1}", Angie.Defaults.LIST_COUNT, people.Count()) ); }
public void MakeListGeneratesCorrectNumberOfEntriesWithStaticOverload() { Angie.Reset(); var personCount = 13; var people = Angie .FastList <Person>(personCount); Assert.AreEqual(people.Count(), personCount); }
public void MakeListGeneratesCorrectNumberOfEntriesWithDefaults() { Angie.Reset(); var personCount = 13; Angie.Default() .ListCount(personCount); var people = Angie .FastList <Person>(); Assert.AreEqual(people.Count(), personCount); }
public void FillPropertyWithRandomValuesFromList() { IList <Person> peeps = Angie.FastList <Person>(10); Angie.Default().ListCount(25); IList <Dog> dogs = Angie.Configure <Dog>().Fill(d => d.Owner).WithRandom(peeps).MakeList(); foreach (Dog dog in dogs) { Assert.IsNotNull(dog.Owner); CollectionAssert.Contains(peeps, dog.Owner); } }
private static void ANewTrendInMusic() { var artists = Angie.FastList <Artist>(50); var genres = Angie.FastList <Genre>(20); var album = Angie .Configure <Album>() .Fill(a => a.Price).WithinRange(7, 10) .Fill(a => a.Artist).WithRandom(artists) .Fill(a => a.Genre).WithRandom(genres) .Make <Album>(); Console.WriteLine(album.ToString()); }