Пример #1
0
 public void ChooseWarriorsAndPrintPlayersStatisticsTest()
 {
     string input = "1" + Environment.NewLine + "4" + Environment.NewLine + "3" + Environment.NewLine;
     Console.SetIn(new StringReader(input));
     _playersManager.ChooseWarriors();
     Assert.IsInstanceOfType(_playersManager.FirstPlayer, typeof(Turtle));
     Assert.IsInstanceOfType(_playersManager.SecondPlayer, typeof(Pigeon));
     Console.SetOut(_stringWriter);
     _playersManager.PrintPlayersStatistics();
     StringAssert.Contains(_stringWriter.ToString(), "Player1: 3 Power; 1 Speed\r\nPlayer2: 1 Power; 3 Speed");
 }