Beispiel #1
0
        public void CanPassNullAndThrowsException()
        {
            //arrange
            ICategory three = new ThreeOfAKindCategory();

            //act
            //assert
            Assert.Throws <ArgumentNullException>(() => three.CalculateScore(null));
        }
Beispiel #2
0
        public void ReturnsSumIfThereAre3OfAKindWhenAllAreSameNumbers()
        {
            //arrange
            ICategory  three       = new ThreeOfAKindCategory();
            List <int> diceNumbers = new List <int>()
            {
                2, 2, 2, 2, 2
            };

            //act
            //assert
            Assert.AreEqual(6, three.CalculateScore(diceNumbers));
        }
Beispiel #3
0
        public void ReturnsSumIfThereAre3OfAKind()
        {
            //arrange
            ICategory  three       = new ThreeOfAKindCategory();
            List <int> diceNumbers = new List <int>()
            {
                1, 1, 1, 4, 5
            };

            //act
            //assert
            Assert.AreEqual(3, three.CalculateScore(diceNumbers));
        }