Пример #1
0
        public void BuildNode_CreatesRootNode()
        {
            var doc = new XDocument(
                new XElement("Customer",
                             new XElement("Name", "Chris")));
            var node = builder.BuildNode(doc);

            Assert.IsNotNull(node);
            Assert.AreEqual("root", node.Name);
        }
Пример #2
0
        public void BuildNode_CreatesRootNode()
        {
            XmlDocument doc = new XmlDocument();

            doc.Load(new StringReader("<Customer><Name>Chris</Name></Customer>"));
            CompositeNode node = builder.BuildNode(doc);

            Assert.IsNotNull(node);
            Assert.AreEqual("root", node.Name);
        }