Example #1
0
 public virtual void OrphanNodeReturnsNullForSiblingElements()
 {
     iText.StyledXmlParser.Jsoup.Nodes.Node node = new iText.StyledXmlParser.Jsoup.Nodes.Element(iText.StyledXmlParser.Jsoup.Parser.Tag
                                                                                                 .ValueOf("p"), "");
     iText.StyledXmlParser.Jsoup.Nodes.Element el = new iText.StyledXmlParser.Jsoup.Nodes.Element(iText.StyledXmlParser.Jsoup.Parser.Tag
                                                                                                  .ValueOf("p"), "");
     NUnit.Framework.Assert.AreEqual(0, node.SiblingIndex());
     NUnit.Framework.Assert.AreEqual(0, node.SiblingNodes().Count);
     NUnit.Framework.Assert.IsNull(node.PreviousSibling());
     NUnit.Framework.Assert.IsNull(node.NextSibling());
     NUnit.Framework.Assert.AreEqual(0, el.SiblingElements().Count);
     NUnit.Framework.Assert.IsNull(el.PreviousElementSibling());
     NUnit.Framework.Assert.IsNull(el.NextElementSibling());
 }