public void TestWrite() { StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); node.Write(sw); Assert.AreEqual("'test'", sb.ToString()); }
public void TestEscape() { StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); StringNode n = new StringNode("'Apostraphes' are cool (parenths are too)"); n.Write(sw); Assert.AreEqual(@"'\'Apostraphes\' are cool \(parenths are too\)'", sb.ToString()); }