public void GameGoToPreviousShouldThrowIfArgumentIsLesserThanZero() { var game = new PingPongGame(); game.GenerateSets(1); game.Start(); game.GoToPreviousSet(); }
public void GameGoToPreviousShouldMoveCurrentSetToPreviousSet() { var game = new PingPongGame(); game.GenerateSets(7); game.Start(); var expected = 1; var actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); game.GoToNextSet(); game.GoToNextSet(); game.GoToNextSet(); game.GoToNextSet(); expected = 5; actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); game.GoToPreviousSet(); expected = 4; actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); game.GoToPreviousSet(); expected = 3; actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); game.GoToPreviousSet(); expected = 2; actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); game.GoToPreviousSet(); expected = 1; actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); }
public void GoToPreviousSet() { _game.GoToPreviousSet(); RaisePropertyChanged("CurrentSet"); }