public void HtmlAttribute_SetsCssClassAttribute()
        {
            actual     = string.Empty;
            returnHtml = string.Empty;
            SpinnerOption target   = new SpinnerOption();
            string        expected = target.CssClass = "Sample";

            returnHtml = Utility.ControlOptionHtmlBuilder <SpinnerOption>(target, _startTag);
            actual     = Utility.GetAttribute(returnHtml, "class", _startTag);
            Assert.AreEqual(expected, actual);
        }
        public void HtmlAttribute_SetsMinimumAttribute()
        {
            actual     = string.Empty;
            returnHtml = string.Empty;
            SpinnerOption target = new SpinnerOption();

            target.Minimum = 10;
            string expected = "{\"min\":10}";

            returnHtml = Utility.ControlOptionHtmlBuilder <SpinnerOption>(target, _startTag);
            actual     = Utility.GetAttribute(returnHtml, "data-control-options", _startTag);
            Assert.AreEqual(expected, actual);
        }
        public void HtmlAttribute_SetsDisabledAttribute()
        {
            actual     = string.Empty;
            returnHtml = string.Empty;
            SpinnerOption target = new SpinnerOption();

            target.Disabled = true;
            string expected = "{\"disabled\":true}";

            returnHtml = Utility.ControlOptionHtmlBuilder <SpinnerOption>(target, _startTag);
            actual     = Utility.GetAttribute(returnHtml, "data-control-options", _startTag);
            Assert.AreEqual(expected, actual);
        }
        public void HtmlAttribute_SetsCustomHtmlAttribute()
        {
            actual     = string.Empty;
            returnHtml = string.Empty;
            SpinnerOption target = new SpinnerOption();

            target.HtmlAttributeList = new RouteValueDictionary(new { CustomAttribute = "Sample" });
            string expected = "Sample";

            returnHtml = Utility.ControlOptionHtmlBuilder <SpinnerOption>(target, _startTag);
            actual     = Utility.GetAttribute(returnHtml, "CustomAttribute", _startTag);
            Assert.AreEqual(expected, actual);
        }
        public void HtmlAttribute_SetsIconsAttribute()
        {
            actual     = string.Empty;
            returnHtml = string.Empty;
            SpinnerOption target = new SpinnerOption();

            target.Icons = new SpinnerIcon("ui-icon-arrowthick-1-n", "ui-icon-arrowthick-1-s");
            string expected = "{\"icons\":{\"up\":\"ui-icon-arrowthick-1-n\",\"down\":\"ui-icon-arrowthick-1-s\"}}";

            returnHtml = Utility.ControlOptionHtmlBuilder <SpinnerOption>(target, _startTag);
            actual     = Utility.GetAttribute(returnHtml, "data-control-options", _startTag);
            Assert.AreEqual(expected, actual);
        }