public void ExtractLinks_Should_Succeed() { var extractor = new PageExtractor(); var pageInfo = extractor.Extract("<link href=\"https:\\\\website.com\""); Assert.AreEqual(1, pageInfo.links.Count()); Assert.AreEqual("https:\\\\website.com", pageInfo.links.First()); }
public void ExtractContent_Should_AsExpected() { var extractor = new PageExtractor(); var pageInfo = extractor.Extract(@" <html> <head> <style></style> </head> <body> <div>Something</div> <script>var abc = function()</script> </body> </html> "); Assert.AreEqual("Something", pageInfo.content.Trim()); }