public void IncrementScoreByOne(int currentScore) { var sut = new TennisPlayer(currentScore); sut.IncrementScore(); var expectedScore = (TennisScore)(currentScore + 1); Assert.AreEqual(expectedScore, sut.GetScore()); }
public void ThrowExceptionWhenInvalidScoreIsIncreased() { var sut = new TennisPlayer(5); Assert.Throws <IndexOutOfRangeException>(() => sut.IncrementScore()); }