public void WriteToReproducesTheBodyOfTheStream() { StructuredStream stream = new StructuredStream("name") { Body = new BodyTag() { Contents = { new TextTag("text") } } }; StructuredTextWriter writer = new StructuredTextWriter(); stream.WriteTo(writer); writer.Close(); Assert.AreEqual(stream.ToString(), writer.ToString()); }
public void WriteToThrowsIfWriterIsNull() { StructuredStream stream = new StructuredStream("name"); Assert.Throws <ArgumentNullException>(() => stream.WriteTo(null)); }