public void StringReader_should_return_written_data() { var writer = new SpoolWriter(); writer.Write("Hello world"); var reader = new SpoolReader(writer); var content = reader.ReadToEnd(); Assert.That(content, Is.EqualTo("Hello world")); }
public void Multiple_writes_are_combined() { var writer = new SpoolWriter(); writer.Write("Hello"); writer.Write(' '); writer.Write("World"); var reader = new SpoolReader(writer); var content = reader.ReadToEnd(); Assert.That(content, Is.EqualTo("Hello World")); }
public void Empty_and_null_writes_are_acceptable() { var writer = new SpoolWriter(); writer.Write("a"); writer.Write(""); writer.Write((string)null); writer.Write("b"); var reader = new SpoolReader(writer); var content = reader.ReadToEnd(); Assert.That(content, Is.EqualTo("ab")); }