public void ShouldDownloadPageContent_DownloadablePage_ReturnsTrue() { var result = _unitUnderTest.ShouldDownloadPageContent(_validCrawledPage, _crawlContext); Assert.AreEqual(true, result.Allow); Assert.AreEqual("", result.Reason); Assert.IsFalse(result.ShouldHardStopCrawl); Assert.IsFalse(result.ShouldStopCrawl); }
public async Task ShouldDownloadPageContent_DownloadablePage_ReturnsTrue() { Uri valid200StatusUri = new Uri(unitTestConfig.SiteSimulatorBaseAddress); CrawlDecision result = _unitUnderTest.ShouldDownloadPageContent(await new PageRequester(new CrawlConfiguration { UserAgentString = "aaa" }).MakeRequestAsync(valid200StatusUri), _crawlContext); Assert.AreEqual(true, result.Allow); Assert.AreEqual("", result.Reason); Assert.IsFalse(result.ShouldHardStopCrawl); Assert.IsFalse(result.ShouldStopCrawl); }
public void ShouldDownloadPageContent_DownloadablePage_ReturnsTrue() { Uri valid200StatusUri = new Uri("http://localhost.fiddler:1111/"); CrawlDecision result = _unitUnderTest.ShouldDownloadPageContent(new PageRequester(new CrawlConfiguration { UserAgentString = "aaa" }).MakeRequest(valid200StatusUri), _crawlContext); Assert.AreEqual(true, result.Allow); Assert.AreEqual("", result.Reason); Assert.IsFalse(result.ShouldHardStopCrawl); Assert.IsFalse(result.ShouldStopCrawl); }