public void ProcessValidWebSource() { Website web = new Website { Url = testUrl }; string actual = processor.GetWebsiteContent(web, m => m); Assert.AreEqual(input, actual); Assert.IsTrue(web.Processed); }
public async Task <IActionResult> Get(string id) { using (var worker = new ProcessorWorker(httpHandler)) { Website website = await repository[id]; if (website == null) { return(NotFound()); } string websiteContent = await worker.GetWebsiteContent(website, ContentProcessor); worker.PopulateIndex(indexRepository.Index, websiteContent, website); await repository.UpdateWebsite(website); await indexRepository.UpdateRepo(); return(Ok()); } }