public void WriteErrorLine_NonNullLine_DoesNotWriteToConsoleOut() { var writer = new ConsoleLineWriter(); writer.WriteErrorLine("LINE1"); writer.WriteErrorLine("LINE2"); Assert.That(_TempOut.ToString(), Is.EqualTo(string.Empty)); }
public void WriteErrorLine_NonNullLine_WritesLineToErrorConsole() { var writer = new ConsoleLineWriter(); writer.WriteErrorLine("LINE1"); writer.WriteErrorLine("LINE2"); CollectionAssert.AreEqual(_TempError.ToString().Split(new[] { Environment.NewLine }, StringSplitOptions.None), new[] { "LINE1", "LINE2", string.Empty }); }
public void WriteErrorLine_NullLine_ThrowsArgumentNullException() { var writer = new ConsoleLineWriter(); Assert.Throws <ArgumentNullException>(() => writer.WriteErrorLine(null)); }