public void FirstTenGeneratedNumbersShouldBePrimes() { var expected = new List <int> { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 }; var actual = PrimeGenerator.GenerateFirst(10).ToArray(); var i = 0; expected.ForEach((number) => { Assert.AreEqual(number, actual[i]); i++; }); }
public void GenerateFirstShouldReturnCollectionWithRightLength() { var primes = PrimeGenerator.GenerateFirst(10).ToArray(); Assert.AreEqual(primes.Length, 10); }