public void DefaultStandardOutputWriter_EmptyConstructor_ValidateWriteMethods() { var writer = new DefaultStandardOutputWriter(); writer.Write("Hello world!"); writer.Write("Hello world!"); Assert.Equal(string.Empty, _output); writer.WriteLine("Hello world!"); writer.Write("Hello world!"); Assert.Equal(string.Empty, _output); }
public void DefaultStandardOutputWriter_BothParametersConstructor_ValidateWriteMethods() { var writer = new DefaultStandardOutputWriter(_write, _writeLine); writer.Write("Hello world!"); writer.Write("Hello world!"); Assert.Equal("Hello world!Hello world!", _output); _output = string.Empty; writer.WriteLine("Hello world!"); writer.Write("Hello world!"); Assert.Equal("Hello world!\nHello world!", _output); }