public void CheckIfConsoleViewIsDrawCorrectly() { ConsoleView testView = new ConsoleView(0, 0, ConsoleColor.Black, ConsoleColor.White, '*'); using (StringWriter sw = new StringWriter()) { Console.SetOut(sw); testView.Draw(); string expected = string.Format("*"); Assert.AreEqual<string>(expected, sw.ToString(), string.Format("Expected ConsoleView to draw \'*\' symbol. Received {0}",sw.ToString())); } }