Пример #1
0
        public void Render_Renders_Correct_Tag()
        {
            var htmlTag = new HtmlTag("input");
            var result = htmlTag.Render();

            result.ShouldContain("<input");
        }
Пример #2
0
        public void Render_Renders_Correct_Attribute()
        {
            var htmlTag = new HtmlTag("input");
            htmlTag.AddAttribute("type", "text");

            var result = htmlTag.Render();

            result.ShouldContain("type=\"text\"");
        }
Пример #3
0
        public void Render_Renders_Correct_Child()
        {
            var child = new HtmlTag("span");
            var parent = new HtmlTag("div");

            parent.AddChild(child);

            var result = parent.Render();

            result.ShouldEqual("<div><span></span></div>");
        }