public void Scrape_NotFoundCountExceded_Returns() { var testff = new TestFetchFunction(); testff.AddNotFound(3); var scraper = new ImageScraper(testff.CreateFunc(), new MockImageRepo().Object); Assert.DoesNotThrow(() => SuppressAbort(() => scraper.Scrape(3))); testff.AssertActionsExausted(); }
public void Scrape_ImageNotFound_DeletesImage() { var testff = new TestFetchFunction(); testff.AddNotFound(1); var mockImageRepo = new MockImageRepo(); var scraper = new ImageScraper(testff.CreateFunc(), mockImageRepo.Object); SuppressAbort(() => scraper.Scrape(3)); mockImageRepo.VerifyDeleteCalled(); }