コード例 #1
0
        public void GetName_FetchPlayerTwoName_String()
        {
            //arrange
            RockPaperScissorsGame newGame = new RockPaperScissorsGame("Player 1", "Player 2");
            //act
            string result = newGame.GetPlayerTwoName();

            //assert
            Assert.AreEqual("Player 2", result);
        }
コード例 #2
0
        public void SetName_SetPlayerTwoName_void()
        {
            //arrange
            string name = "Joel";
            RockPaperScissorsGame newGame = new RockPaperScissorsGame("Player 1", "Player 2");

            //act
            newGame.SetPlayerTwoName(name);
            //assert
            Assert.AreEqual("Joel", newGame.GetPlayerTwoName());
        }