public void CreateElementTest() { const string Name = "name"; const string NamepaceName = "namespaceName"; XElement element = XDocumentHelpers.CreateElement("name", "namespaceName"); CheckName(element, Name, NamepaceName); }
public void CreateElementWithContentTest() { const string Name = "name"; const string NamepaceName = "namespaceName"; var content = new XText("content"); XElement element = XDocumentHelpers.CreateElement("name", "namespaceName", content); CheckName(element, Name, NamepaceName); List <XNode> nodes = element.Nodes().ToList(); Assert.AreEqual(1, nodes.Count); Assert.AreEqual(content, nodes.Single()); }