public void GameGoToSetShouldMoveCurrentSetToGivenArgument() { var game = new PingPongGame(); game.GenerateSets(11); game.Start(); game.GoToSet(1); var expected = 1; var actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); game.GoToSet(2); expected = 2; actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); game.GoToSet(4); expected = 4; actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); game.GoToSet(8); expected = 8; actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); game.GoToSet(1); expected = 1; actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); }
public void GameGoToSetShouldThrowIfArgumentIsOutsideOfNumberOfSetsBounds() { var game = new PingPongGame(); game.GenerateSets(11); game.Start(); game.GoToSet(-1); game.GoToSet(12); }