Ejemplo n.º 1
0
        public void CreateButtonHelp_Hidden()
        {
            // Arrange
            var isHidden = true;
            var buttonHtml = "<span>[TEXT]</span><span>[DESCRIPTION]</span>";
            var text = "Button Text";
            var description = "Button Description";

            var htmlBuilder = new HtmlBuilder(null, null, null, null, null, null, null, null);

            // Act
            var result = htmlBuilder.CreateButtonHelp(isHidden, buttonHtml, text, description);

            // Assert
            Assert.That(result, Is.EqualTo(string.Empty), "The button content should be hidden.");
        }
Ejemplo n.º 2
0
        public void CreateHelpButton_Visible()
        {
            // Arrange
            var isHidden = false;
            var buttonFormat = "<span>{0}</span><span>{1}</span>";
            var buttonHtml = string.Format(buttonFormat, "[TEXT]", "[DESCRIPTION]");
            var text = "Button Text";
            var description = "Button Description";

            var htmlBuilder = new HtmlBuilder(null, null, null, null, null, null, null, null);

            // Act
            var result = htmlBuilder.CreateButtonHelp(isHidden, buttonHtml, text, description);

            // Assert
            var expected = string.Format(buttonFormat, text, description);
            Assert.That(result, Is.EqualTo(expected), "The button content should be visible and formatted.");
        }