Пример #1
0
        public void NumbersTooLow()
        {
            ILottoCollection target = CreateILottoCollection();

            var input = new List <short> {
                -1, -2, -3, -4, -5, 0
            };

            target.WinsJackpot(input);
        }
Пример #2
0
        public void NotInitialised()
        {
            ILottoCollection target = CreateILottoCollection();

            var input = new List <short> {
                1, 2, 3, 4, 5, 6
            };

            target.WinsJackpot(input);
        }
Пример #3
0
        public void NumbersTooHigh()
        {
            ILottoCollection target = CreateILottoCollection();

            var input = new List <short> {
                51, 52, 53, 54, 55, 50
            };

            target.WinsJackpot(input);
        }
Пример #4
0
        public void NotUniqueNumbers()
        {
            ILottoCollection target = CreateILottoCollection();

            var input = new List <short> {
                1, 2, 3, 4, 5, 5
            };

            target.WinsJackpot(input);
        }
Пример #5
0
        public void TooManyNumbers()
        {
            ILottoCollection target = CreateILottoCollection();

            var input = new List <short> {
                1, 2, 3, 4, 5, 6, 7
            };

            target.WinsJackpot(input);
        }
Пример #6
0
        public void JackpotWinningNumbers()
        {
            ILottoCollection target = CreateILottoCollection();

            target.LoadAllDraws(FullFileName);

            bool expected = true;
            bool actual;

            actual = target.WinsJackpot(new List <short> {
                1, 22, 35, 39, 42, 48
            });

            Assert.AreEqual(expected, actual);
        }
Пример #7
0
        public void NoJackpotNumbers()
        {
            ILottoCollection target = CreateILottoCollection();

            target.LoadAllDraws(FullFileName);

            bool expected = false;
            bool actual;

            actual = target.WinsJackpot(new List <short> {
                1, 2, 3, 4, 5, 6
            });

            Assert.AreEqual(expected, actual);
        }
Пример #8
0
        public void WinsAnythingWithJackpotWinningNumbers()
        {
            // need to create a smaller dataset for this test
            ILottoCollection target = CreateILottoCollection();

            target.LoadAllDraws(MediumSetFilename);

            bool expected = true;
            bool actual;

            actual = target.WinsAnything(new List <short> {
                1, 2, 3, 39, 42, 48
            });

            Assert.AreEqual(expected, actual);
        }