public void Win_For_Paper_Rock() { var player1 = new Player("player1", new Rock()); var player2 = new Player("player2", new Paper()); var game = new Game(player1, player2); var result = game.Play(); Assert.AreSame(player2, result.Winner); }
public void Win_For_Scissors_Paper() { var player1 = new Player("player1", new Scissors()); var player2 = new Player("player2", new Paper()); var game = new Game(player1, player2); var result = game.Play(); Assert.AreEqual(player1, result.Winner); }
public void Draw_For_Scissors_Scissors() { var player1 = new Player("player1", new Scissors()); var player2 = new Player("player2", new Scissors()); var game = new Game(player1, player2); var result = game.Play(); Assert.True(result.Draw); Assert.IsNull(result.Winner); }