Beispiel #1
0
        public void TestUpper()
        {
            int[] testDice = new int[5] {
                1, 1, 1, 1, 2
            };
            ScoreCardOptions testGame = new ScoreCardOptions();
            int test = testGame.calcUpper(testDice, 1);

            Assert.AreEqual(4, test);
        }
Beispiel #2
0
        public void TestYahtzee()
        {
            int[] testDice = new int[5] {
                1, 1, 1, 1, 1
            };
            ScoreCardOptions testGame = new ScoreCardOptions();
            int test = testGame.calcYahtzee(testDice);

            Assert.AreEqual(50, test);
        }
Beispiel #3
0
        public void TestChance()
        {
            int[] testDice = new int[5] {
                1, 1, 1, 1, 2
            };
            ScoreCardOptions testGame = new ScoreCardOptions();
            int test = testGame.calcChance(testDice);

            Assert.AreEqual(6, test);
        }
Beispiel #4
0
        public void TestLargeStr()
        {
            int[] testDice = new int[5] {
                1, 3, 2, 4, 5
            };
            ScoreCardOptions testGame = new ScoreCardOptions();
            int test = testGame.calcLargeStraight(testDice);

            Assert.AreEqual(40, test);
        }
Beispiel #5
0
        public void TestSmallStr()
        {
            int[] testDice = new int[5] {
                1, 3, 2, 4, 1
            };
            ScoreCardOptions testGame = new ScoreCardOptions();
            int test = testGame.calcSmallStraight(testDice);

            Assert.AreEqual(30, test);
        }
Beispiel #6
0
        public void TestFullHouse()
        {
            int[] testDice = new int[5] {
                4, 1, 4, 1, 4
            };
            ScoreCardOptions testGame = new ScoreCardOptions();
            int test = testGame.calcFullHouse(testDice);

            Assert.AreEqual(25, test);
        }
Beispiel #7
0
        public void TestFourOfAKind()
        {
            int[] testDice = new int[5] {
                5, 5, 5, 2, 5
            };
            ScoreCardOptions testGame = new ScoreCardOptions();
            int test = testGame.calcFourOfKind(testDice);

            Assert.AreEqual(20, test);
        }
Beispiel #8
0
        public void TestThreeOfAKind()
        {
            int[] testDice = new int[5] {
                1, 1, 4, 6, 6
            };
            ScoreCardOptions testGame = new ScoreCardOptions();
            int test = testGame.calcThreeOfKind(testDice);

            Assert.AreEqual(0, test);
        }