public void SelectEmptyElements() { using (var reader = XmlReader.Create(new StringReader(XML_CONTENT))) { var navigator = new XPathDocument(reader).CreateNavigator(); navigator.SelectEmptyElements().Select(n => n.Name).Should().BeEquivalentTo("empty-parent", "empty-child", "non-nil-child", "firstname"); } }
public void SelectEmptyElements() { using (var reader = XmlReader.Create(new StringReader(XML_CONTENT))) { var navigator = new XPathDocument(reader).CreateNavigator(); Assert.That( navigator.SelectEmptyElements().Select(n => n.Name), Is.EqualTo(new[] { "empty-parent", "empty-child", "non-nil-child", "firstname" })); } }