예제 #1
0
        public void TestMixedContent()
        {
            var elem = new Siprec();

            elem.AddText("before")
            .AddChild("Child").AddText("content");
            elem.AddText("after");

            Assert.AreEqual(
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
                "<Siprec>before<Child>content</Child>after</Siprec>",
                elem.ToString()
                );
        }
예제 #2
0
        public void TestElementWithTextNode()
        {
            var elem = new Siprec();

            elem.AddText("Here is the content");

            Assert.AreEqual(
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
                "<Siprec>Here is the content</Siprec>",
                elem.ToString()
                );
        }