예제 #1
0
        public void NextNodes_IgnoresAttributes()
        {
            HtmlElement element1 = new HtmlElement("element1");
            HtmlComment comment  = new HtmlComment("comment");
            HtmlElement element2 = new HtmlElement("element2");
            HtmlElement parent   = new HtmlElement("parent", element1, comment, new HtmlAttribute("attribute"), element2);

            Assert.Equal(new HtmlElement[] { element2 }, comment.NextNodes());
        }
예제 #2
0
        public void NextNodes_ReturnsExpected()
        {
            HtmlElement element1 = new HtmlElement("element1");
            HtmlComment comment  = new HtmlComment("comment");
            HtmlElement element2 = new HtmlElement("element2");
            HtmlElement parent   = new HtmlElement("parent", element1, comment, element2);

            Assert.Equal(new HtmlNode[] { comment, element2 }, element1.NextNodes());
            Assert.Equal(new HtmlNode[] { element2 }, comment.NextNodes());
            Assert.Empty(element2.NextNodes());
        }