/// <summary>
 /// Returns an Icon
 /// 
 /// Returns a span with the Base CSS Class
 /// according to the direction specified.
 /// <example><code><![CDATA[<span class="baseClassForDirection">&nbsp;</span>]]></code></example>
 /// </summary>
 /// <param name="inIcon">Icon to show</param>
 /// <param name="htmlAttributes">Additional html attributes dictionary to set to the created span</param>
 /// <returns>Html of created Icon span</returns>
 public static string FamFamSprites(this HtmlHelper helper,
    FamFamSpritesEnum inIcon,
    RouteValueDictionary htmlAttributes)
 {
     return mFamFamSpritesAndButtonsRepository.GetIcon(inIcon,
         htmlAttributes,
         Shared.Direction.Ltr);
 }
        public void FamFamSpritesButtonTestPassedButtonText()
        {
            //Arrange
            HtmlHelper helper = null;
            string inText = "Button Text";
            FamFamSpritesEnum inIcon = new FamFamSpritesEnum();
            string expected = string.Format(">{0}</span>", inText);
            //Act
            string actual = FamFamSpritesIconButtonsHtmlHelper.FamFamSpritesButton(helper, inText, inIcon);

            //Assert
            Assert.IsTrue(actual.Contains(expected));
        }
        public void FamFamSpritesButtonTestPassedAttributesObjectsForInnerSpan()
        {
            //Arrange
            HtmlHelper helper = null;
            string inText = string.Empty;
            FamFamSpritesEnum inIcon = new FamFamSpritesEnum();
            Shared.ButtonType inButtonType = new Shared.ButtonType();
            Shared.Direction inDirection = new Shared.Direction();
            object htmlAttributes = null;
            object innerSpanHtmlAttributes = new { id = "idTest" };
            string expected = "id=\"idTest\"";

            //Act
            string actual = FamFamSpritesIconButtonsHtmlHelper.FamFamSpritesButton(helper,
                inText, inIcon, inButtonType, inDirection, htmlAttributes, innerSpanHtmlAttributes);

            //Assert
            Assert.IsTrue(actual.Contains(expected));
        }
 /// <summary>
 /// Returns an Icon
 /// 
 /// Returns a span with the Base CSS Class
 /// according to the direction specified.
 /// <example><code><![CDATA[<span class="baseClassForDirection">&nbsp;</span>]]></code></example>
 /// </summary>
 /// <param name="inIcon">Icon to show</param>
 /// <returns>Html of created Icon span</returns>
 public static string FamFamSprites(this HtmlHelper helper,
  FamFamSpritesEnum inIcon)
 {
     return FamFamSprites(helper, inIcon, null);
 }
 /// <summary>
 /// Returns a link with an Icon
 /// </summary>
 /// <param name="inText">Link Text</param>
 /// <param name="inIcon">Icon to show</param>
 /// <param name="inDirection">Direction (Ltr|Rtl)</param>
 /// <param name="inUrl">Link Url (href)</param>
 /// <param name="htmlAttributes">Additional html attributes dictionary to set to the created button</param>
 /// <param name="innerSpanHtmlAttributes">Additional html attributes dictionary to set to the created span for the button text</param>
 /// <param name="innerIconHtmlAttributes">Additional html attributes dictionary to set to the created span for the Icon</param>
 /// <returns>Html of created Icon Link</returns>
 public static string FamFamSpritesLink(this HtmlHelper helper,
     string inText,
     FamFamSpritesEnum inIcon,
     string inUrl,
     MVCUIHelpers.Shared.Direction inDirection,
     object htmlAttributes,
     object innerSpanHtmlAttributes,
     object innerIconHtmlAttributes)
 {
     return mFamFamSpritesAndButtonsRepository.GetIconLink(
         inText,
         inIcon,
         inDirection,
         inUrl,
         htmlAttributes,
         innerSpanHtmlAttributes,
         innerIconHtmlAttributes);
 }
 /// <summary>
 /// Returns a given element with an Icon
 /// </summary>
 /// <param name="inText">Text to display in Element</param>
 /// <param name="inIcon">Icon to show</param>
 /// <param name="inElement">Html Element
 /// <example><code>a|div|li</code> etc</example></param>
 /// <param name="htmlAttributes">Additional html attributes dictionary to set to the created button</param>
 /// <param name="innerSpanHtmlAttributes">Additional html attributes dictionary to set to the created span for the button text</param>
 /// <param name="innerIconHtmlAttributes">Additional html attributes dictionary to set to the created span for the Icon</param>
 /// <returns>Html of created element with Icon</returns>
 public static string FamFamSpritesForElement(this HtmlHelper helper,
     string inText,
     FamFamSpritesEnum inIcon,
     string inElement,
     object htmlAttributes,
     object innerSpanHtmlAttributes,
     object innerIconHtmlAttributes)
 {
     return mFamFamSpritesAndButtonsRepository.GetIconForElement(
         inText,
         inIcon,
         MVCUIHelpers.Shared.Direction.Ltr,
         inElement,
         htmlAttributes,
         innerSpanHtmlAttributes,
         innerIconHtmlAttributes);
 }
 /// <summary>
 /// Returns a given element with an Icon
 /// </summary>
 /// <param name="inText">Text to display in Element</param>
 /// <param name="inIcon">Icon to show</param>
 /// <param name="inElement">Html Element
 /// <example><code>a|div|li</code> etc</example></param>
 /// <returns>Html of created element with Icon</returns>
 public static string FamFamSpritesForElement(this HtmlHelper helper,
     string inText,
     FamFamSpritesEnum inIcon,
     string inElement)
 {
     return mFamFamSpritesAndButtonsRepository.GetIconForElement(
         inText,
         inIcon,
         MVCUIHelpers.Shared.Direction.Ltr,
         inElement,
         null,
         null,
         null);
 }
 /// <summary>
 /// Returns a button with an Icon
 /// 
 /// <example><code><![CDATA[<button type="Submit"><span class="baseClassForDirection">&nbsp;</span><span>ButtonText</span></button>]]></code></example>
 /// </summary>
 /// <param name="inText">Text to display on button</param>
 /// <param name="inIcon">Icon to show</param>
 /// <param name="inButtonType">Type of button (Submit|Button|Reset)</param>
 /// <param name="inDirection">Direction (Ltr|Rtl)</param>
 /// <param name="htmlAttributes">Additional html attributes dictionary to set to the created button</param>
 /// <param name="innerSpanHtmlAttributes">Additional html attributes dictionary to set to the created span for the button text</param>
 /// <returns>Html of created Icon Button</returns>
 public static string FamFamSpritesButton(this HtmlHelper helper,
    string inText,
    FamFamSpritesEnum inIcon,
    MVCUIHelpers.Shared.ButtonType inButtonType,
    MVCUIHelpers.Shared.Direction inDirection,
    object htmlAttributes,
    object innerSpanHtmlAttributes)
 {
     return FamFamSpritesButton(helper,
         inText,
         inIcon,
         inButtonType,
         inDirection,
         htmlAttributes,
         innerSpanHtmlAttributes,
         null);
 }
        public void FamFamSpritesForElementTestInnerSpanHtmlAndInnerIconHtmlAttributes()
        {
            //Arrange
            HtmlHelper helper = null;
            string inText = string.Empty;
            FamFamSpritesEnum inIcon = new FamFamSpritesEnum();
            string inElement = "a";
            object htmlAttributes = null;
            object innerSpanHtmlAttributes = new { id = "innerSpanHtmlAttributesID" };
            object innerIconHtmlAttributes = new { id = "innerIconHtmlAttributesID" };
            string expectedSpanID = "id=\"innerSpanHtmlAttributesID\"";
            string expectedIconID = "id=\"innerIconHtmlAttributesID\"";

            //Act
            string actual = FamFamSpritesIconButtonsHtmlHelper.FamFamSpritesForElement(helper, inText, inIcon, inElement, htmlAttributes, innerSpanHtmlAttributes, innerIconHtmlAttributes);

            //Assert
            Assert.IsTrue(actual.Contains(expectedSpanID));
            Assert.IsTrue(actual.Contains(expectedIconID));
        }
        public void FamFamSpritesTestRouteValueDictionaryParameter()
        {
            //Arrange
            HtmlHelper helper = null;
            FamFamSpritesEnum inIcon = new FamFamSpritesEnum(); // TODO: Initialize to an appropriate value
            RouteValueDictionary htmlAttributes = new RouteValueDictionary(new { id = "testID" }); // TODO: Initialize to an appropriate value
            string expected = "id=\"testID\"";

            //Act
            string actual = FamFamSpritesIconButtonsHtmlHelper.FamFamSprites(helper, inIcon, htmlAttributes);

            //Assert
            Assert.IsTrue(actual.Contains(expected));
        }
        public void FamFamSpritesTestPassedHtmlAttributes()
        {
            //Arrange
            HtmlHelper helper = null;
            FamFamSpritesEnum inIcon = new FamFamSpritesEnum();
            object htmlAttributes = new { id = "idTest" }; // TODO: Initialize to an appropriate value
            string expected = "id=\"idTest\"";

            //Act
            string actual = FamFamSpritesIconButtonsHtmlHelper.FamFamSprites(helper, inIcon, htmlAttributes);

            //Assert
            Assert.IsTrue(actual.Contains(expected));
        }
 public void FamFamSpritesLinkTest4()
 {
     HtmlHelper helper = null; // TODO: Initialize to an appropriate value
     string inText = string.Empty; // TODO: Initialize to an appropriate value
     FamFamSpritesEnum inIcon = new FamFamSpritesEnum(); // TODO: Initialize to an appropriate value
     string inUrl = string.Empty; // TODO: Initialize to an appropriate value
     object htmlAttributes = null; // TODO: Initialize to an appropriate value
     object innerSpanHtmlAttributes = null; // TODO: Initialize to an appropriate value
     object innerIconHtmlAttributes = null; // TODO: Initialize to an appropriate value
     string expected = string.Empty; // TODO: Initialize to an appropriate value
     string actual;
     actual = FamFamSpritesIconButtonsHtmlHelper.FamFamSpritesLink(helper, inText, inIcon, inUrl, htmlAttributes, innerSpanHtmlAttributes, innerIconHtmlAttributes);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
        public void FamFamSpritesForElementTestWithEmptyElement()
        {
            //Arrange
            HtmlHelper helper = null;
            string inText = string.Empty;
            FamFamSpritesEnum inIcon = new FamFamSpritesEnum();
            string inElement = string.Empty;
            bool failed = false;

            //Act
            try
            {
                string actual = FamFamSpritesIconButtonsHtmlHelper.FamFamSpritesForElement(helper, inText, inIcon, inElement);
            }
            catch (Exception)
            {
                failed = true;

            }

            //Assert
            Assert.IsTrue(failed);
        }
        public void FamFamSpritesForElementTestWithA()
        {
            //Arrange
            HtmlHelper helper = null;
            string inText = string.Empty;
            FamFamSpritesEnum inIcon = new FamFamSpritesEnum();
            string inElement = "a";
            string expectedStart = "<a";
            string expectedEnd = "</a>";

            //Act
            string actual = FamFamSpritesIconButtonsHtmlHelper.FamFamSpritesForElement(helper, inText, inIcon, inElement);

            //Assert
            Assert.IsTrue(actual.StartsWith(expectedStart));
            Assert.IsTrue(actual.EndsWith(expectedEnd));
        }
 /// <summary>
 /// Returns a link with an Icon
 /// </summary>
 /// <param name="inText">Link Text</param>
 /// <param name="inIcon">Icon to show</param>
 /// <param name="inDirection">Direction (Ltr|Rtl)</param>
 /// <param name="inUrl">Link Url (href)</param>
 /// <param name="htmlAttributes">Additional html attributes dictionary to set to the created button</param>
 /// <param name="innerSpanHtmlAttributes">Additional html attributes dictionary to set to the created span for the button text</param>
 /// <param name="innerIconHtmlAttributes">Additional html attributes dictionary to set to the created span for the Icon</param>
 /// <returns>Html of created Icon Link</returns>
 public static string FamFamSpritesLink(this HtmlHelper helper,
     string inText,
     FamFamSpritesEnum inIcon,
     string inUrl)
 {
     return mFamFamSpritesAndButtonsRepository.GetIconLink(
         inText,
         inIcon,
         MVCUIHelpers.Shared.Direction.Ltr,
         inUrl,
         null,
         null,
         null);
 }
 /// <summary>
 /// Returns a link with an Icon
 /// </summary>
 /// <param name="inText">Link Text</param>
 /// <param name="inIcon">Icon to show</param>
 /// <param name="inUrl">Link Url (href)</param>
 /// <param name="htmlAttributes">Additional html attributes dictionary to set to the created button</param>
 /// <param name="innerSpanHtmlAttributes">Additional html attributes dictionary to set to the created span for the button text</param>
 /// <param name="innerIconHtmlAttributes">Additional html attributes dictionary to set to the created span for the Icon</param>
 /// <returns>Html of created Icon Link</returns>
 public static string FamFamSpritesLink(this HtmlHelper helper,
     string inText,
     FamFamSpritesEnum inIcon,
     string inUrl,
     RouteValueDictionary htmlAttributes,
     RouteValueDictionary innerSpanHtmlAttributes,
     RouteValueDictionary innerIconHtmlAttributes)
 {
     return mFamFamSpritesAndButtonsRepository.GetIconLink(
         inText,
         inIcon,
         MVCUIHelpers.Shared.Direction.Ltr,
         inUrl,
         htmlAttributes,
         innerSpanHtmlAttributes,
         innerIconHtmlAttributes);
 }
        public void FamFamSpritesButtonTestPassedHtmlAttributes()
        {
            //Arrange
            HtmlHelper helper = null;
            string inText = string.Empty;
            FamFamSpritesEnum inIcon = new FamFamSpritesEnum();
            object htmlAttributes = new { id = "testID" };
            string expected = "id=\"testID\"";

            //Act
            string actual = FamFamSpritesIconButtonsHtmlHelper.FamFamSpritesButton(helper, inText, inIcon, htmlAttributes);

            //Assert
            Assert.IsTrue(actual.Contains(expected));
        }
 /// <summary>
 /// Returns a button with an Icon
 /// 
 /// <example><code><![CDATA[<button type="Submit"><span class="baseClassForDirection">&nbsp;</span><span>ButtonText</span></button>]]></code></example>
 /// </summary>
 /// <param name="inText">Text to display on button</param>
 /// <param name="inIcon">Icon to show</param>
 /// <returns>Html of created Icon Button</returns>
 public static string FamFamSpritesButton(this HtmlHelper helper,
     string inText,
     FamFamSpritesEnum inIcon)
 {
     return FamFamSpritesButton(helper,
         inText,
         inIcon,
         MVCUIHelpers.Shared.ButtonType.Button,
         MVCUIHelpers.Shared.Direction.Ltr,
         null,
         null,
         null);
 }
 public void FamFamSpritesForElementTestAllParamsWithRouteValueDictionaries()
 {
     //Arrange
     HtmlHelper helper = null;
     string inText = string.Empty;
     FamFamSpritesEnum inIcon = new FamFamSpritesEnum();
     string inElement = "a";
     RouteValueDictionary htmlAttributes = new RouteValueDictionary(new { htmlAttrib = "htmlAttrib" });
     RouteValueDictionary innerSpanHtmlAttributes = null; // TODO: Initialize to an appropriate value
     RouteValueDictionary innerIconHtmlAttributes = null; // TODO: Initialize to an appropriate value
     string expected = string.Empty; // TODO: Initialize to an appropriate value
     string actual;
     actual = FamFamSpritesIconButtonsHtmlHelper.FamFamSpritesForElement(helper, inText, inIcon, inElement, htmlAttributes, innerSpanHtmlAttributes, innerIconHtmlAttributes);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }