public void GameGenerateSetsShouldThrowIfArgumentIsNegativeOrZero() { var game = new PingPongGame(); game.GenerateSets(-1); game.GenerateSets(0); }
public MainWindowViewModel() { _game = new PingPongGame(); _game.GenerateSets(11); _game.Start(); }
public void GameGoToNextShouldMoveCurrentSetToNextSet() { var game = new PingPongGame(); game.GenerateSets(7); game.Start(); var expected = 1; var actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); game.GoToNextSet(); expected = 2; actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); game.GoToNextSet(); expected = 3; actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); game.GoToNextSet(); expected = 4; actual = game.CurrentSet.Number; Assert.AreEqual(expected, actual); }
public void GameGenerateSetsShouldBeCalledBeforeGameStart() { var game = new PingPongGame(); game.Start(); game.GenerateSets(11); }
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 GameGoToNextSetShouldThrowIfArgumentIsGreaterThanIndexOfLastSet() { var game = new PingPongGame(); game.GenerateSets(1); game.Start(); game.GoToNextSet(); }
public void GameGoToPreviousShouldThrowIfArgumentIsLesserThanZero() { var game = new PingPongGame(); game.GenerateSets(1); game.Start(); game.GoToPreviousSet(); }
public void GameGoToSetShouldThrowIfArgumentIsOutsideOfNumberOfSetsBounds() { var game = new PingPongGame(); game.GenerateSets(11); game.Start(); game.GoToSet(-1); game.GoToSet(12); }
public void GameMarkSetAsFaultForTeamShouldThrowIfArgumentIsNegativeZeroOrGreaterThanTwo() { var game = new PingPongGame(); game.GenerateSets(11); game.Start(); game.MarkSetAsFaultForTeam(-1); game.MarkSetAsFaultForTeam(0); game.MarkSetAsFaultForTeam(3); }
public void GameMarkSetAsPointForTeamShouldMarkCurrentSetAsAPointForAGivenTeam() { var game = new PingPongGame(); game.GenerateSets(11); game.Start(); game.MarkSetAsPointForTeam(1); var expected = 1; var actual = game.CurrentSet.ForTeam; Assert.AreEqual(expected, actual); }
public void SetUp() { _game.GenerateSets(11); _game.Start(); }
public void GameMarkSetAsPointForTeamShouldThrowIfArgumentIsNegativeZeroOrGreaterThanTwo() { var game = new PingPongGame(); game.GenerateSets(11); game.Start(); game.MarkSetAsPointForTeam(-1); game.MarkSetAsPointForTeam(0); game.MarkSetAsPointForTeam(3); }