public void ToStringTest() { ConsoleOutputReceiver receiver = new ConsoleOutputReceiver(); receiver.AddOutput("Hello, World!"); receiver.AddOutput("See you!"); receiver.Flush(); Assert.Equal("Hello, World!\r\nSee you!\r\n", receiver.ToString()); }
public void ToStringIgnoredLineTest2() { ConsoleOutputReceiver receiver = new ConsoleOutputReceiver(); receiver.AddOutput("Hello, World!"); receiver.AddOutput("$See you!"); receiver.Flush(); Assert.AreEqual("Hello, World!\r\n", receiver.ToString()); }
public void ToStringIgnoredLineTest2() { ConsoleOutputReceiver receiver = new ConsoleOutputReceiver(); receiver.AddOutput("Hello, World!"); receiver.AddOutput("$See you!"); receiver.Flush(); Assert.Equal("Hello, World!\r\n", receiver.ToString(), ignoreLineEndingDifferences: true); }