public void Write_WithNoIndentation() { var sw = new StringWriter(); var iw = new IndentingTextWriter(sw, " "); iw.Write("Hello\r\nWorld"); String result = sw.GetStringBuilder().ToString(); Assert.AreEqual("Hello\r\nWorld", result); }
public void Write_WithIndentationTokenContainingNewLine_DoesNotRecurse() { var sw = new StringWriter(); var iw = new IndentingTextWriter(sw, "\r\n "); iw.IncreaseIndentation(1); iw.Write("Hello\r\nWorld"); String result = sw.GetStringBuilder().ToString(); Assert.AreEqual("\r\n Hello\r\n\r\n World", result); }