コード例 #1
0
ファイル: ElementTest.cs プロジェクト: ygrenier/HDocument
        public void TestNextAll()
        {
            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[] { n3, n4 }, n2.NextAll().ToArray());
            Assert.Equal(new HNode[] { n2, n3, n4 }, new HNode[] { n1, n3, n4 }.NextAll().ToArray());

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