Esempio n. 1
0
        public void TestPrevAll()
        {
            var n1      = new HText("Content 1");
            var n2      = new HElement("span", "Content 2");
            var n3      = new HElement("span", "Content 3");
            var n4      = new HText("Content 4");
            var element = new HElement("div", n1, n2, n3, n4);

            Assert.Equal(new HNode[] { n2, n1 }, n3.PrevAll().ToArray());
            Assert.Equal(new HNode[] { n2, n1, n3 }, new HNode[] { n1, n3, n4 }.PrevAll().ToArray());

            Assert.Equal(new HNode[] { }, ((HNode[])null).PrevAll().ToArray());
        }