public HTMLScannerTests()
        {
            HTMLScanner = new HTMLScanner();
            htmlPage    = null;
            string filePath = Path.Combine(TestContext.CurrentContext.WorkDirectory, @"HTML\index.html");

            using (FileStream fileStream = File.OpenRead(filePath))
                using (StreamReader streamReader = new StreamReader(fileStream))
                {
                    htmlPage = streamReader.ReadToEnd();
                }

            pageObjects = HTMLScanner.ScanHtmlPage(htmlPage);
        }
Example #2
0
        public XMLWriterTests()
        {
            HTMLScanner = new HTMLScanner();
            HtmlPage    = null;
            FilePath    = Path.Combine(TestContext.CurrentContext.WorkDirectory, @"HTML\index.html");

            using (FileStream fileStream = File.OpenRead(FilePath))
                using (StreamReader streamReader = new StreamReader(fileStream))
                {
                    HtmlPage = streamReader.ReadToEnd();
                }

            PageObjects = HTMLScanner.ScanHtmlPage(HtmlPage);
            XmlWriter   = new XMLWriter();
            Document    = XmlWriter.CreateDocument(PageObjects, "http://www.totallyratted.com", "main");
        }