public void Should_add_a_line_break_for_a_new_line()
        {
            // Arrange
            var converter = new UnicodeFileToHtmTextConverter(new StringReader("Cheers\nBen Wu"));

            // Act & Assert
            Assert.AreEqual("Cheers<br />Ben Wu<br />", converter.ConvertToHtml());
        }
        public void Should_convert_greater_than_and_less_than()
        {
            // Arrange
            var converter = new UnicodeFileToHtmTextConverter(new StringReader(">_<|||"));

            // Act & Assert
            Assert.AreEqual("&gt;_&lt;|||<br />", converter.ConvertToHtml());
        }
        public void Should_covert_ampersand()
        {
            // Arrange
            var converter = new UnicodeFileToHtmTextConverter(new StringReader("H&M"));

            // Act & Assert
            Assert.AreEqual("H&amp;M<br />", converter.ConvertToHtml());
        }
        public void should_convert_ampersand()
        {
            var stubSource = new StubUnicodeTextSource();
            stubSource.StubCallToGetTextReader("Cut & Paste");

            var target = new UnicodeFileToHtmTextConverter(stubSource);
            string result = target.ConvertToHtml();

            Assert.AreEqual(result, "Cut &amp; Paste<br />", "html converted text");
        }
        public void should_add_breakline_for_multiple_lines()
        {
            var stubSource = new StubUnicodeTextSource();
            stubSource.StubCallToGetTextReader("hello\nhow are you doing?");

            var target = new UnicodeFileToHtmTextConverter(stubSource);
            string result = target.ConvertToHtml();

            Assert.AreEqual(result, "hello<br />how are you doing?<br />", "html converted text");
        }
        public void should_convert_greater_than_and_less_than()
        {
            var stubSource = new StubUnicodeTextSource();
            stubSource.StubCallToGetTextReader("10 > 5; 5 < 10");

            var target = new UnicodeFileToHtmTextConverter(stubSource);
            string result = target.ConvertToHtml();

            Assert.AreEqual(result, "10 &gt; 5; 5 &lt; 10<br />", "html converted text");
        }
        public void should_convert_ampersand()
        {
            var stubSource = new StubUnicodeTextSource();

            stubSource.StubCallToGetTextReader("Cut & Paste");

            var    target = new UnicodeFileToHtmTextConverter(stubSource);
            string result = target.ConvertToHtml();

            Assert.AreEqual(result, "Cut &amp; Paste<br />", "html converted text");
        }
        public void should_add_breakline_for_multiple_lines()
        {
            var stubSource = new StubUnicodeTextSource();

            stubSource.StubCallToGetTextReader("hello\nhow are you doing?");

            var    target = new UnicodeFileToHtmTextConverter(stubSource);
            string result = target.ConvertToHtml();

            Assert.AreEqual(result, "hello<br />how are you doing?<br />", "html converted text");
        }
        public void should_convert_greate_than_and_less_than()
        {
            var stubSource = new StubUnicodeTextSource();

            stubSource.StubCallToGetTextReader("10 > 5; 5 < 10");

            var    target = new UnicodeFileToHtmTextConverter(stubSource);
            string result = target.ConvertToHtml();

            Assert.AreEqual(result, "10 &gt; 5; 5 &lt; 10<br />", "html converted text");
        }