private void Play(int ballsToPlayer1, int ballsToPlayer2, string expectedScore) { tennis = new CleanCode.Tennis(); for (int i = 0; i < ballsToPlayer1; i++) tennis.AwardPointToPlayer1(); for (int i = 0; i < ballsToPlayer2; i++) tennis.AwardPointToPlayer2(); Assert.AreEqual(expectedScore, tennis.PrintScore()); }
private void Play(int ballsToPlayer1, int ballsToPlayer2, string expectedScore) { tennis = new CleanCode.Tennis(); for (int i = 0; i < ballsToPlayer1; i++) { tennis.AwardPointToPlayer1(); } for (int i = 0; i < ballsToPlayer2; i++) { tennis.AwardPointToPlayer2(); } Assert.AreEqual(expectedScore, tennis.PrintScore()); }