Esempio n. 1
0
        public void IncrementScoreByOne(int currentScore)
        {
            var sut = new TennisPlayer(currentScore);

            sut.IncrementScore();
            var expectedScore = (TennisScore)(currentScore + 1);

            Assert.AreEqual(expectedScore, sut.GetScore());
        }
Esempio n. 2
0
        public void ThrowExceptionWhenInvalidScoreIsIncreased()
        {
            var sut = new TennisPlayer(5);

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