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