public void PrimeNumberGenerator_Generate_LargeNumbers(int length)
        {
            // Arrange
            IEnumerable <int> result = null;
            var testObject           = new Lib.PrimeNumberGenerator();

            // Act, Assert
            Assert.DoesNotThrow(() => result = testObject.Generate(length));
            if (length >= 500)
            {
                Assert.AreEqual(3571, result.ElementAt(499));
            }
            if (length >= 10000)
            {
                Assert.AreEqual(104729, result.ElementAt(9999));
            }
            if (length >= 100000)
            {
                Assert.AreEqual(1299709, result.ElementAt(99999));
            }

            // Note that tests of this and higher ranges may take very long to compute
            if (length >= 1000000)
            {
                Assert.AreEqual(15485863, result.ElementAt(999999));
            }
            if (length >= 10000000)
            {
                Assert.AreEqual(179424673, result.ElementAt(9999999));
            }
            if (length >= 50000000)
            {
                Assert.AreEqual(982451653, result.ElementAt(49999999));
            }
        }
        public IEnumerable <int> PrimeNumberGenerator_Generate(int length)
        {
            // Arrange
            var testObject = new Lib.PrimeNumberGenerator();

            // Act
            var result = testObject.Generate(length);

            // Assert
            Assert.AreEqual(length, result.Count());

            return(result);
        }
        public IEnumerable<int> PrimeNumberGenerator_Generate(int length)
        {
            // Arrange
            var testObject = new Lib.PrimeNumberGenerator();

            // Act
            var result = testObject.Generate(length);

            // Assert
            Assert.AreEqual(length, result.Count());

            return result;
        }
        public void PrimeNumberGenerator_Generate_LargeNumbers(int length)
        {
            // Arrange
            IEnumerable<int> result = null;
            var testObject = new Lib.PrimeNumberGenerator();

            // Act, Assert
            Assert.DoesNotThrow(() => result = testObject.Generate(length));
            if (length >= 500) Assert.AreEqual(3571, result.ElementAt(499));
            if (length >= 10000) Assert.AreEqual(104729, result.ElementAt(9999));
            if (length >= 100000) Assert.AreEqual(1299709, result.ElementAt(99999));

            // Note that tests of this and higher ranges may take very long to compute
            if (length >= 1000000) Assert.AreEqual(15485863, result.ElementAt(999999));
            if (length >= 10000000) Assert.AreEqual(179424673, result.ElementAt(9999999));
            if (length >= 50000000) Assert.AreEqual(982451653, result.ElementAt(49999999));
        }