public void ErrorOnIllegalChars() { using (var s = new StringReader("\x000B")) using (var encoder = new XmlTextEncoder(s, filterIllegalChars: false)) { Assert.Throws(typeof(ArgumentException), () => encoder.ReadToEnd()); } }
public void SimpleReader() { using (var s = new StringReader("<foo>\n</foo>")) using (var encoder = new XmlTextEncoder(s)) { Assert.AreEqual("<foo>\n</foo>", encoder.ReadToEnd()); } }