public void ToPlainTextWorksWithUnicodeSpaceTest()
        {
            string theHTML = "Test\u00a0Unicode";
            string result = new HtmlString(theHTML).ToPlainText();

            Assert.AreEqual(result, "Test Unicode");
        }
        public void ToPlainTextWorksWithWhitespaceTest()
        {
            string theHTML = " ";
            string result = new HtmlString(theHTML).ToPlainText();

            Assert.AreEqual(result, string.Empty);
        }
        public void ToPlainTextWorksWithHTMLTagsTest()
        {
            string theHTML = "<html><head><body><table><tr><td><div><span>test</span></div></td></tr></table></body></head></html>";
            string result = new HtmlString(theHTML).ToPlainText();

            Assert.AreEqual(result, "test");
        }
        public void ToPlainTextWorksWithApostrophesTest()
        {
            string theHTML = "‘’";
            string result = new HtmlString(theHTML).ToPlainText();

            Assert.AreEqual(result, "‘’");
        }
        public void ToPlainTextWorksWithQuotesTest()
        {
            string theHTML = "“”";
            string result = new HtmlString(theHTML).ToPlainText();

            Assert.AreEqual(result, "“”");
        }
        public void ToPlainTextWorksWithFitNesseStandardVersionTest()
        {
            fitSharp.Parser.HtmlString.IsStandard = true; 
            string theHTML = "  <html>&lt;head&gt;&lt;body&gt;&amp;</p  ><p>   &nbsp;t<br>&nbsp;e&nbsp;s&nbsp;t&nbsp;&quot;&lt;/body&gt;&lt;/head&gt;</html>  ";
            string result = new HtmlString(theHTML).ToPlainText();

            Assert.AreEqual(result, "<head><body>&\n  t\n e s t \"</body></head>");
        }
        public void ToPlainTextWorksWithSpecialCharactersTest()
        {
            string theHTML = ")(*&^%$<>#@!!~`:;\"'><.,/?{}[]|\\";
            string result = new HtmlString(theHTML).ToPlainText();
            System.Console.WriteLine(result);

            Assert.AreEqual(result, ")(*&^%$<>#@!!~`:;\"'><.,/?{}[]|\\");
        }
        public void ToPlainTextWorksWithAmpersandHTMLTagsTest()
        {
            string theHTML = "&lt;head&gt;&lt;body&gt;&amp;&nbsp;test&quot;&lt;/body&gt;&lt;/head&gt;";
            string result = new HtmlString(theHTML).ToPlainText();
            System.Console.WriteLine(result);

            Assert.AreEqual(result, "<head><body>& test\"</body></head>");
        }
        public override StringCollection GetParameters(bool getFirstItem)
        {
            StringCollection pList = new StringCollection();

            int i = (getFirstItem)? 0 : 1;

            for (; i < row.Count; i++)
            {
                string cellText = new HtmlString(row[i]).ToPlainText();
                ReplaceSymbols(ref cellText);
                row[i] = cellText;

                pList.Add(row[i]);
            }

            return pList;
        }
        public void UnEscapeWorksWhenNBSPIsPassedAsParameterTest()
        {
            string html = "&nbsp;";
            HtmlString htmlString = new HtmlString(html);
            string result = ReflectionHelper.InvokeMethod<string>(htmlString, "UnEscape", html);

            Assert.AreEqual(" ", result);
        }