Exemple #1
0
        public void TestSieveBiggestInFirstHunderd()
        {
            int numberOfItems  = 100;
            int expectedResult = 97;

            Sieve sieve = new Sieve();

            int result = sieve.GetMaxPrime(100);

            Assert.AreEqual(expectedResult, result);
        }
Exemple #2
0
        public void TestSieveBiggestInFirstHunderd()
        {
            int numberOfItems = 100;
            int expectedResult = 97;

            Sieve sieve = new Sieve();

            int result = sieve.GetMaxPrime(100);

            Assert.AreEqual(expectedResult, result);
        }
Exemple #3
0
        public void ZeroOneAndTwoNotRemoved()
        {
            int numberOfItems = 100;

            Sieve sieve = new Sieve();

            List <int> result = sieve.Run(100);

            Assert.True(result.Any(x => x == 2));
            Assert.True(result.Any(x => x == 1));
            Assert.True(result.Any(x => x == 0));
        }
Exemple #4
0
        public void ZeroOneAndTwoNotRemoved()
        {
            int numberOfItems = 100;

            Sieve sieve = new Sieve();

            List<int> result = sieve.Run(100);

            Assert.True(result.Any(x => x == 2));
            Assert.True(result.Any(x => x == 1));
            Assert.True(result.Any(x => x == 0));
        }