Example #1
0
        public void TestMixedContent()
        {
            var elem = new Autopilot();

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

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

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

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