示例#1
0
        public void CanPassNullAndThrowsException()
        {
            //arrange
            ICategory chance = new ChanceCategory();

            //act
            //assert
            Assert.Throws <ArgumentNullException>(() => chance.CalculateScore(null));
        }
示例#2
0
        public void Returns0WhenThereAreNoThreeOfAKind()
        {
            //arrange
            ICategory  chance      = new ChanceCategory();
            List <int> diceNumbers = new List <int>()
            {
                1, 2, 3, 4, 5
            };

            //act
            //assert
            Assert.AreEqual(15, chance.CalculateScore(diceNumbers));
        }