示例#1
0
        public void TestPrependToElement()
        {
            var content = new HElement("span", "Content");
            var element = new HElement("div", "First Content");

            Assert.Same(content, content.PrependTo(element));
            Assert.Equal("<div><span>Content</span>First Content</div>", element.ToString());

            Assert.Same(content, content.PrependTo(null));

            content = null;
            Assert.Null(content.PrependTo(element));
        }