Exemplo n.º 1
0
        public void TestMethod_Count()
        {
            // arrange
            int        value = 2;
            List <int> dice  = new List <int> {
                2, 2, 5, 2, 4
            };

            // act
            yahtzeeForm yahtzee  = new yahtzeeForm();
            int         actual   = yahtzee.Count(value, dice);
            int         expected = 3;

            // assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void TestMethod_Roll()
        {
            // arrange

            List <int> dice = new List <int> {
                4, 5, 6
            };
            int numDie = 1;
            // act
            yahtzeeForm yahtzee = new yahtzeeForm();

            yahtzee.Roll(numDie, dice);
            int expected = 4;
            int actual   = dice.Count;

            // assert
            Assert.AreEqual(expected, actual);
        }