public void ConsoleRendererTestDrawBoard() { Board board = new Board(5, 5, 10); StringBuilder result = new StringBuilder(); result.Append(" 0 1 2 3 4 \n"); result.Append(" ___________\n"); result.Append("0 | ? ? ? ? ? |\n"); result.Append("1 | ? ? ? ? ? |\n"); result.Append("2 | ? ? ? ? ? |\n"); result.Append("3 | ? ? ? ? ? |\n"); result.Append("4 | ? ? ? ? ? |\n"); result.Append(" ___________\n"); Console.SetOut(stringWriter); renderer.DrawBoard(board); string expected = result.ToString(); string actual = stringWriter.ToString(); Assert.AreEqual(expected, actual, "The message was displayed incorrectly!"); }