public HtmlEngine(HtmlScrapper scrapper, int threads = 10) { _scrapper = scrapper; _linkSite = new LinkSiteFileWriter(); _throttler = new SemaphoreSlim(initialCount: threads); _htmlLinkHandler = new HtmlLinkHandler(_scrapper); }
public void GivenInValidLink_WhenIsValidLinkExecuted_ShouldReturnFalse() { //Arrange var scrapper = new MockHtmlScrapper(); var htmlLinkHandler = new HtmlLinkHandler(scrapper) { }; //Act var validlink = "/unknown/thisisatest"; var result = htmlLinkHandler.IsValidLink(validlink); //Assert Assert.False(result); }