public void CheckWin_ForPlayer2Wins_ReturnTrue() { //Arrange Project_Pong.Form1.PongGame Test = new Project_Pong.Form1.PongGame(); //Act bool Player2Won = Test.CheckWin(8, 11); //Assert Assert.IsTrue(Player2Won); }
public void Restart_ForPlayer2Score_ChecksXSpeed() { //Arrange Project_Pong.Form1.PongGame Test = new Project_Pong.Form1.PongGame(); //Act Test.Restart(2); int XSpeed = Test.Xspeed; //Assert Assert.AreEqual(XSpeed, -1); }
public void CheckScore_ForPlayer2ScoreChanged_ReturnTrue() { //Arrange Rectangle Ball = new Rectangle(0, 115, 16, 16); Project_Pong.Form1.PongGame Test = new Project_Pong.Form1.PongGame(Ball); //Act bool ScoreChanged = Test.CheckScore(1, 1); //Assert Assert.IsTrue(ScoreChanged); }