public void TextWriter_Can_Not_Be_Null() { TextWriter writer = null; var raw = new RawString("value"); Assert.Throws <ArgumentNullException>(() => { raw.WriteTo(writer); }); }
public void WriteTo_Writes_ToSpecifiedWriter() { string value = "value"; var raw = new RawString(value); var writer = new StringWriter(); raw.WriteTo(writer); string result = writer.ToString(); Assert.NotNull(result); Assert.Equal(value, result); }