public void UpFirstRound() { TennisGame game = new TennisGame("Name_1", "Name_2"); game.UpRound(game.Player_1()); Assert.IsTrue(game.Player_1().Score(0) == 15); }
public void UpFourthRoundClear() { TennisGame game = new TennisGame("Name_1", "Name_2"); game.UpRound(game.Player_1()); game.UpRound(game.Player_1()); game.UpRound(game.Player_1()); game.UpRound(game.Player_1()); Assert.IsTrue((game.Player_1().Score(0) == 0) && (game.Player_2().Score(0) == 0) && (game.Player_1().Score(1) == 1) && (game.Player_2().Score(1) == 0) && (game.result[0, 0] == 1) && (game.result[1, 0] == 0)); }
public void UpFourthRoundWithoutAD() { TennisGame game = new TennisGame("Name_1", "Name_2"); game.UpRound(game.Player_1()); game.UpRound(game.Player_1()); game.UpRound(game.Player_1()); game.UpRound(game.Player_2()); game.UpRound(game.Player_2()); game.UpRound(game.Player_2()); game.UpRound(game.Player_1()); Assert.IsTrue((game.Player_1().Score(0) == 40) && (game.Player_2().Score(0) == 40) && (game.result[0, 0] == 0) && (game.result[1, 0] == 0) && (game.Advantage() == "Name_1")); }
public void SetAdvantage() { TennisGame game = new TennisGame("Name_1", "Name_2"); game.SetAdvantage(1); Assert.IsTrue(game.Advantage() == game.Player_1().Name()); }
public void PlayersDifferent() { TennisGame game = new TennisGame("Eman", "Eman"); Assert.IsTrue(game.Player_1().Name() == "Eman_1"); Assert.IsTrue(game.Player_2().Name() == "Eman_2"); }
public void PlayersCorrectly() { TennisGame game = new TennisGame("Name_1", "Name_2"); Assert.IsTrue(game.Player_1().Name() == "Name_1"); Assert.IsTrue(game.Player_2().Name() == "Name_2"); }
public void UpFiveRoundWithAD() { TennisGame game = new TennisGame("Name_1", "Name_2"); game.UpRound(game.Player_1()); game.UpRound(game.Player_1()); game.UpRound(game.Player_1()); game.UpRound(game.Player_2()); game.UpRound(game.Player_2()); game.UpRound(game.Player_2()); game.UpRound(game.Player_1()); game.UpRound(game.Player_1()); Assert.IsTrue((game.Player_1().Score(0) == 0) && (game.Player_2().Score(0) == 0) && (game.Player_1().Score(1) == 1) && (game.Player_2().Score(1) == 0) && (game.result[0, 0] == 1) && (game.result[1, 0] == 0) && (game.Advantage() == "Nothing")); }
public void ChangeSides() { TennisGame game = new TennisGame("Name_1", "Name_2"); game.ChangeSides(); Assert.IsTrue((game.LeftSide() == game.Player_2()) && (game.RightSide() == game.Player_1())); }
public void StartLeftSide() { TennisGame game = new TennisGame("Name_1", "Name_2"); Assert.IsTrue(game.LeftSide() == game.Player_1()); }