public void Test_HtmlSlotParser_1() { string input = Helper.RawStringOfTestFile("Sample HTML.txt"); var result = new HtmlSlotParser().Parse(input); Test_SlotParser.TestForResultCorrectness(result); }
public void Test_ParsingHtml_1() { var desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\"; string path = desktopPath + @"TTAPv7.7\NUnit.Tests2\TestFiles\Sample HTML.txt"; string htmlText = File.ReadAllText(path); string plain = ExtensionMethods.RemoveTags(htmlText); var actual = new SlotParser().Parse(plain); int expected = new SlotParser().Parse(File.ReadAllText(Test_SlotParser.TestFilePath())).Count; Console.WriteLine("Actual count is " + actual.Count); Console.WriteLine("Expected count is " + expected); Assert.True(actual.Count == expected); }