public void Getters_PlayerOneNameAndGameWinner_String() { //arrange RockPaperScissorsGame newGame = new RockPaperScissorsGame("Player 1", "Player 2"); //act string result = newGame.GetPlayerOneName(); string gameWinnerResult = newGame.GetGameWinner(); //assert Assert.AreEqual("Player 1", result); Assert.AreEqual(" ", gameWinnerResult); }
public void Setters_PlayerOneNameAndGameWinner_void() { //arrange string name = "Joel"; string name2 = "Sara"; RockPaperScissorsGame newGame = new RockPaperScissorsGame("Player 1", "Player 2"); //act newGame.SetPlayerOneName(name); newGame.SetGameWinner(name2); //assert Assert.AreEqual("Joel", newGame.GetPlayerOneName()); Assert.AreEqual("Sara", newGame.GetGameWinner()); }
public void GameResult_SetScores_int() { //arrange RockPaperScissorsGame newGame = new RockPaperScissorsGame("Player 1", "Player 2"); //act newGame.SetPlayerOneChoice("Scissors"); newGame.SetPlayerTwoChoice("Paper"); newGame.GameResult(); string result = newGame.GetGameWinner(); //assert Assert.AreEqual(1, newGame.GetPlayerOneWins()); Assert.AreEqual(result, "Player 1 Wins!"); }