public void HtmlAttribute_SetsCssClassAttribute() { actual = string.Empty; returnHtml = string.Empty; ButtonSetOption target = new ButtonSetOption(); string expected = target.CssClass = "Sample"; returnHtml = Utility.ControlOptionHtmlBuilder <ButtonSetOption>(target, _startTag); actual = Utility.GetAttribute(returnHtml, "class", _startTag); Assert.AreEqual(expected, actual); }
public void HtmlAttribute_SetsCustomHtmlAttribute() { actual = string.Empty; returnHtml = string.Empty; ButtonSetOption target = new ButtonSetOption(); target.HtmlAttributeList = new RouteValueDictionary(new { CustomAttribute = "Sample" }); string expected = "Sample"; returnHtml = Utility.ControlOptionHtmlBuilder <ButtonSetOption>(target, _startTag); actual = Utility.GetAttribute(returnHtml, "CustomAttribute", _startTag); Assert.AreEqual(expected, actual); }