Esempio n. 1
0
        public void TestMixedContent()
        {
            var elem = new Sim();

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

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

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

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