Exemplo n.º 1
0
 public void MoveTest()
 {
     List<Player> playerList = new List<Player>();
     playerList.Add(new Player { Name = "Mihai" });
     playerList.Add(new Player { Name = "Ionel" });
     playerList.Add(new Player { Name = "Test" });
     Game target = new Game(playerList); // TODO: Initialize to an appropriate value
     target.player_Changed += new EventHandler(target_player_Changed);
     target.game_Move += new EventHandler(target_game_Move);
     int numberOfSteps = 2; // TODO: Initialize to an appropriate value
     target.NextPlayer();
     target.Move(numberOfSteps);
     Assert.IsTrue(target.CurrentPlayer.CurrentCell.Number == numberOfSteps);
 }
Exemplo n.º 2
0
 public void NextPlayerTest()
 {
     List<Player> playerList = new List<Player>();
     playerList.Add(new Player { Name = "Mihai" });
     playerList.Add(new Player { Name = "Ionel" });
     playerList.Add(new Player { Name = "Test" });
     Game target = new Game(playerList); // TODO: Initialize to an appropriate value
     target.player_Changed += new EventHandler(target_player_Changed);
     target.NextPlayer();
     target.NextPlayer();
     string actualName = "Ionel";
     Assert.AreEqual(target.CurrentPlayer.Name, actualName);
 }