public void Generate_button_with_default_options()
        {
            var h = HtmlCreator.BuildButton("value");

            HtmlApprovals.VerifyHtml(h.ToHtmlString());
        }
 public static void VerifyHtml(string html)
 {
     HtmlApprovals.VerifyHtml(html);
 }
示例#3
0
        public void Set_tabindex_attribute()
        {
            var fc = Field.Configure().TabIndex(44);

            HtmlApprovals.VerifyHtml(fc.Attributes.ToHtmlString());
        }
示例#4
0
        public void Set_autofocus_attribute()
        {
            var fc = Field.Configure().AutoFocus();

            HtmlApprovals.VerifyHtml(fc.Attributes.ToHtmlString());
        }
        public void Generate_input_without_name()
        {
            var h = HtmlCreator.BuildInput(null, "value&", "submit", new HtmlAttributes().AddClass("lol"));

            HtmlApprovals.VerifyHtml(h.ToHtmlString());
        }
        public void Generate_submit_button_with_non_default_options()
        {
            var h = HtmlCreator.BuildButton("thevalue&", "submit", "myId", htmlAttributes: new HtmlAttributes(new { onclick = "return false;", @class = "a&^&*FGdf" }));

            HtmlApprovals.VerifyHtml(h.ToHtmlString());
        }