Exemplo n.º 1
0
 public void TestActualCamelotUrl()
 {
     CamelotScraper scraper = new CamelotScraper("https://www.national-lottery.co.uk/games/scratchcards/prizes");
     scraper.Scrape();
     Assert.IsNotNull(scraper.LastUpdated, "Last updated was null");
     Assert.IsInstanceOfType(scraper.DateLastUpdated, typeof(DateTime));
     Assert.IsFalse(scraper.DateLastUpdated.Equals(DateTime.MinValue), "Failed to parse last Updated date and reverted to DateTime.MinValue.");
 }
Exemplo n.º 2
0
 public void TestWithLocalUrl()
 {
     CamelotScraper scraper = new CamelotScraper("http://localhost:8125/");
     scraper.Scrape();
     Assert.AreEqual(scraper.LastUpdated, "This information is updated weekly and is correct as of Tuesday 26th August 2014 at 04:36.");
 }
Exemplo n.º 3
0
 public void TestShouldThrowException()
 {
     CamelotScraper scraper = new CamelotScraper("http://anonsenseUrl/baz");
     scraper.Scrape();
 }