コード例 #1
0
ファイル: GameTest.cs プロジェクト: Flavius1924/Piticot
 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);
 }
コード例 #2
0
ファイル: GameTest.cs プロジェクト: Flavius1924/Piticot
 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);
 }