Esempio n. 1
0
        public void TestWrite()
        {
            StringBuilder sb = new StringBuilder();
            StringWriter  sw = new StringWriter(sb);

            node.Write(sw);
            Assert.AreEqual("'test'", sb.ToString());
        }
Esempio n. 2
0
        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());
        }