public void FormatAsBold_GivenString_ReturnStringWrappedWithStrongElement(string input)
        {
            var result = formatter.FormatAsBold(input);

            //general assertion
            Assert.That(result, Is.EqualTo($"<strong>{input}</strong>").IgnoreCase);

            //general assertion 2
            Assert.That(result, Does.StartWith("<strong>"));
            Assert.That(result, Does.EndWith("</strong>"));

            //specific assertion
            Assert.That(result, Is.EqualTo($"<strong>abc</strong>"));
        }
Exemplo n.º 2
0
        public static void FormatAsBold_ShouldEnclose_StringWithStrongTags(string word)
        {
            var htmlFormatter = new HtmlFormatter();
            var result        = htmlFormatter.FormatAsBold(word);

            Assert.That(result, Is.EqualTo($"<strong>{word}</strong>"));
        }
Exemplo n.º 3
0
        public void FormatAsBold_WhenGivenAlphanumericString_ReturnsStringSurroundedByStrongTags()
        {
            var htmlFormatter = new HtmlFormatter();
            var result        = htmlFormatter.FormatAsBold("Test123");

            Assert.That(result, Is.EqualTo("<strong>Test123</strong>").IgnoreCase);
        }
Exemplo n.º 4
0
        public void HTMLformater_Bold_ReturnTrue()
        {
            var HtmlFormat = new HtmlFormatter();
            var result     = HtmlFormat.FormatAsBold("abc");
            var output     = "<strong>abc</strong>";

            Assert.AreEqual(output, result);
        }
Exemplo n.º 5
0
        public void FormatAsBold_EncloseTheStringWithStrongElement_ShouldReturnTrue()
        {
            var htmlFormatter = new HtmlFormatter();

            var result = htmlFormatter.FormatAsBold("This is bold text!");

            Assert.That(result, Is.EqualTo("<strong>This is bold text!</strong>").IgnoreCase);
        }
Exemplo n.º 6
0
        public void FormatAsBold_WhenGivenAString_ReturnsTheStringAsHtmlBold()
        {
            HtmlFormatter htmlFormatter = new HtmlFormatter();

            var result = htmlFormatter.FormatAsBold("abc");

            Assert.That(result, Is.EqualTo("<strong>abc</strong>"));
        }
        public void FormatAsBold_WhenCalled_ShouldEncloseTheStringWithStrongElement(string input)
        {
            var result = _htmlFormatter.FormatAsBold(input);

            Assert.IsTrue(result.StartsWith("<strong>", System.StringComparison.Ordinal));
            Assert.IsTrue(result.EndsWith("</strong>", System.StringComparison.Ordinal));
            Assert.IsTrue(result.Contains(input, System.StringComparison.Ordinal));
        }
Exemplo n.º 8
0
        public void FormatAsBold_WhenCalled_ShouldEncloseTheStringWithStrongElement()
        {
            var formatter = new HtmlFormatter();

            var result = formatter.FormatAsBold("abc");

            Assert.That(result, Is.EqualTo("<strong>abc</strong>"));
        }
        public void FormatAsBold_Called_ReturnsStringEnclosedWithStrongTag()
        {
            HtmlFormatter htmlFormatter = new HtmlFormatter();

            var result = htmlFormatter.FormatAsBold("a");

            Assert.That(result, Is.EqualTo("<strong>A</strong>").IgnoreCase /*Ignores Case Sensetivity*/);
        }
Exemplo n.º 10
0
        public void FormatAsBold_WhenCalled_ShouldEncloseTheStringWithStrongElement(string value)
        {
            var result = _formater.FormatAsBold(value);

            Assert.That(result, Is.EqualTo($"<strong>{value}</strong>"));
            Assert.That(result, Does.StartWith("<strong"));
            Assert.That(result, Does.EndWith("</strong>"));
        }
Exemplo n.º 11
0
        public void FormatAsBold_WhenCalled_ShouldEncloseStringWithStrongTag()
        {
            var formatter = new HtmlFormatter();

            var result = formatter.FormatAsBold("ABC");

            Assert.That(result, Is.EqualTo("<strong>ABC</strong>").IgnoreCase);
        }
        public void FormatAsBold_ShouldReturnStringEndsWithStrongTag()
        {
            var sut = new HtmlFormatter();

            var result = sut.FormatAsBold("hello");

            Assert.That(result, Does.EndWith("</strong>"));
        }
        public void FormatAsBold_WhenCalled_EnclosedArgumentWithStrongElement()
        {
            var htmlFormatter = new HtmlFormatter();

            var result = htmlFormatter.FormatAsBold("abc");

            Assert.AreEqual("<strong>abc</strong>", result);
        }
Exemplo n.º 14
0
        public void FormatAsBold_WhenCalled_ShouldEncloseStringWithStrongElement()
        {
            var htmlFormatter = new HtmlFormatter();

            var formattedText = htmlFormatter.FormatAsBold("test");

            Assert.That(formattedText, Is.EqualTo("<strong>test</strong>"));
        }
        public void FormatAsBold_WhenCalled_ShouldEncloseTheStringWithStrongElement(string content)
        {
            var formatter = new HtmlFormatter();

            var result = formatter.FormatAsBold(content);

            Assert.That(result, Is.EqualTo($"<strong>{content}</strong>"));
        }
Exemplo n.º 16
0
        public void FormatAsBold_WhenCalled_ShouldEncolseTheStringWithStrongElement()
        {
            var formatter      = new HtmlFormatter();
            var result         = formatter.FormatAsBold("abc");
            var expectedResult = "<strong>abc</strong>";

            Assert.IsTrue(result.Equals(expectedResult));
        }
Exemplo n.º 17
0
        public void FormatAsBold_WhenCalled_ShouldReturnTheBoldString()
        {
            var formatter = new HtmlFormatter();

            var result = formatter.FormatAsBold("abc");

            Assert.That(result, Does.Contain("abc"));
            Assert.That(result, Does.EndWith("</strong>").IgnoreCase);
        }
Exemplo n.º 18
0
        public void FormatAsBold_WhenCalled_ReturnsStringWithStrongEncluser()
        {
            var htmlFormatter = new HtmlFormatter();

            var result = htmlFormatter.FormatAsBold("Hello World");

            Assert.That(result, Does.StartWith("<strong>"));
            Assert.That(result, Does.EndWith("</strong>"));
        }
        public void FormatAsBold_BoldTest_ReturnBold()
        {
            var txt           = "HEllo";
            var htmlFormatter = new HtmlFormatter();

            var result = htmlFormatter.FormatAsBold(txt);

            Assert.That(result, Is.EqualTo($"<strong>{txt}</strong>"));
        }
        public void FormatAsBold_WhenCalled_EncloseTheStringWithStrongElement()
        {
            var htmlFormatter = new HtmlFormatter();

            var result = htmlFormatter.FormatAsBold("myString");

            // Specific
            Assert.That(result, Is.EqualTo("<strong>myString</strong>").IgnoreCase);
        }
Exemplo n.º 21
0
        public void FormatAsBold_WhenCalled_ShouldEncloseTheStringWithStrongElement()
        {
            var formatter = new HtmlFormatter();
            var result    = formatter.FormatAsBold("abc");

            Assert.That(result, Does.StartWith("<strong>"));
            Assert.That(result, Does.EndWith("</strong>"));
            Assert.That(result, Does.Contain("abc"));
        }
        public void FormatAsBold_WhenCalled_ReturnStringWithStong()
        {
            var htmlFormatter = new HtmlFormatter();
            var result        = htmlFormatter.FormatAsBold("abc");

            Assert.That(result, Does.StartWith("<strong>"));
            Assert.That(result, Does.EndWith("</strong>"));
            Assert.That(result, Does.Contain("abc"));
        }
Exemplo n.º 23
0
        public void FormatAsBold_WhenCalled_ReturnSurroundedByStrongTag()
        {
            var htmlFormatter = new HtmlFormatter();

            var result = htmlFormatter.FormatAsBold("abc");

            //Assert.AreEqual(result, "<Strong>abc</strong>");
            Assert.That(result, Is.EqualTo("<Strong>abc</strong>").IgnoreCase);
        }
Exemplo n.º 24
0
        public void FormatAsBold_GivenString_ReturnsGivenStringWrappedAroundStrong(string content)
        {
            var formatter = new HtmlFormatter();

            var result = formatter.FormatAsBold(content);

            Assert.IsTrue(result.StartsWith("<strong>"));
            Assert.IsTrue(result.EndsWith("</strong>"));
            Assert.IsTrue(result.Contains(content));
        }
        public void FormatAsBold_WhenCalled_ShouldEncloseTheStringWithStrongElement(string a)
        {
            var result = _formatter.FormatAsBold(a);

            // More general

            Assert.That(result, Does.StartWith("<strong>").IgnoreCase);
            Assert.That(result, Does.EndWith("</strong>").IgnoreCase);
            Assert.That(result, Does.Contain(a));
        }
Exemplo n.º 26
0
        public void FormatAsBold_OnCalled_ExpectedValidHTML([Values("abc", "azy", "xyz")] string content)
        {
            var htmlFormatter = new HtmlFormatter();
            var result        = htmlFormatter.FormatAsBold(content);

            //Assert.That(result, Is.EqualTo("<strong>abc</strong>"));
            Assert.That(result, Does.StartWith("<strong>").IgnoreCase);
            Assert.That(result, Does.EndWith("</strong>").IgnoreCase);
            Assert.That(result, Does.Contain(content).IgnoreCase);
        }
Exemplo n.º 27
0
        public void FormatAsBold_WhenCalled_ShouldEncloseArgumentInStrongElement()
        {
            // Arrange
            testString = "test";

            // Act
            var result = _formatter.FormatAsBold(testString);

            // Assert
            Assert.That(result, Is.EqualTo($"<strong>{testString}</strong>").IgnoreCase);
        }
        public void FormatAsBold_ShouldEncloseTheStringWithStrongElement()
        {
            var result = _htmlFormatter.FormatAsBold("abc");

            //Specific
            Assert.That(result, Is.EqualTo("<strong>abc</strong>").IgnoreCase);

            //More general
            Assert.That(result, Does.StartWith("<strong>").IgnoreCase);
            Assert.That(result, Does.EndWith("</strong>").IgnoreCase);
            Assert.That(result, Does.Contain("abc").IgnoreCase);
        }
        public void FormatAsBold_WhenCall_ReturnStrongString()
        {
            var htmlFormatter = new HtmlFormatter();

            var result = htmlFormatter.FormatAsBold("abc");

            Assert.That(result, Is.EqualTo("<strong>abc</strong>").IgnoreCase);

            Assert.That(result, Does.StartWith("<strong>"));
            Assert.That(result, Does.EndWith("</strong>"));
            Assert.That(result, Does.Contain("abc"));
        }
Exemplo n.º 30
0
        public void FormatAsBold_WhenCalled_ShouldEnclodeTheStringWithStrongElement()
        {
            var formatter = new HtmlFormatter();
            var result    = formatter.FormatAsBold("najeeb");

            //specific
            Assert.That(result, Is.EqualTo("<strong>najeeb</strong>").IgnoreCase);
            //moregeneral
            Assert.That(result, Does.StartWith("<strong>"));
            Assert.That(result, Does.EndWith("</strong>"));
            Assert.That(result, Does.Contain("najeeb"));
        }