public void MapShownCorrectly() { using (StringWriter sw = new StringWriter()) { Console.SetOut(sw); presenter.ShowMap(gameMap.Object); var actual = sw.ToString(); StringBuilder sb = new StringBuilder(); sb.AppendLine(" A B C D "); sb.AppendLine("01 o "); sb.AppendLine("02 ████ o "); sb.AppendLine("03 o "); var expected = sb.ToString(); Assert.AreEqual(expected, actual); } }