示例#1
0
        public void DecreaseScoreByOne(int currentScore)
        {
            var sut = new TennisPlayer(currentScore);

            sut.DecreaseScore();
            var expectedScore = (TennisScore)(currentScore - 1);

            Assert.AreEqual(expectedScore, sut.GetScore());
        }
示例#2
0
        public void ThrowExceptionWhenInvalidScoreIsDecremented()
        {
            var sut = new TennisPlayer();

            Assert.Throws <IndexOutOfRangeException>(() => sut.DecreaseScore());
        }