public void HiddenInputTag_does_not_output_name_attribute_for_unnamed_components() { var renderer = new ComboBoxHtmlBuilder(new EditorComboBox("FontFace", new List <DropDownItem>() { new DropDownItem { Text = "Arial", Value = "Arial,Verdana,sans-serif" } }, TestHelper.CreateViewContext())); IHtmlNode tag = renderer.HiddenInputTag(); Assert.False(tag.Attributes().ContainsKey("name")); }
protected override IHtmlNode BuildCore() { var li = new HtmlTag("li") .AddClass("t-editor-combobox"); var builder = new ComboBoxHtmlBuilder(comboBox); IHtmlNode rootTag = builder.Build(); builder.InnerContentTag().AppendTo(rootTag); builder.HiddenInputTag().AppendTo(rootTag); rootTag.AppendTo(li); return li; }
public void HiddenInputTag_should_render_input() { IHtmlNode tag = renderer.HiddenInputTag(); Assert.Equal("input", tag.TagName); }
public void HiddenInputTag_does_not_output_name_attribute_for_unnamed_components() { var renderer = new ComboBoxHtmlBuilder(new EditorComboBox("FontFace", new List<DropDownItem>() { new DropDownItem { Text = "Arial", Value = "Arial,Verdana,sans-serif" } }, TestHelper.CreateViewContext() )); IHtmlNode tag = renderer.HiddenInputTag(); Assert.False(tag.Attributes().ContainsKey("name")); }