public void LinkCrawlerMetadataShould_ActuallyGetTheThumbnail_ForCronica() { // Arrange Uri endpoint = new Uri("http://www.cronica.com.ar/diario/2012/07/30/30541-delpo-quiere-meterse-en-la-tercera-ronda.html"); ILinkCrawlerService linkCrawler = new LinkCrawlerService(new HttpHelper()); // Act Link link = linkCrawler.CrawlHttpResource(endpoint); // Assert Assert.AreEqual("http://www.cronica.com.ar/imgs_notas/2012/07/30/30541_114532_650x420.jpg", link.Picture); }
public void LinkCrawlerMetadataShould_BeProperlyLineBroken() { // Arrange Uri endpoint = new Uri("http://stackoverflow.com/questions/11706125/how-to-keep-sticky-checkboxes-from-resetting-when-submitting-multiple-forms-on"); ILinkCrawlerService linkCrawler = new LinkCrawlerService(new HttpHelper()); // Act Link link = linkCrawler.CrawlHttpResource(endpoint); // Assert Assert.IsFalse(link.Description.Contains("\n\n\n")); }
public void LinkCrawlerMetadataShould_GetProperDescription_ForGuiaSkater() { // Arrange Uri endpoint = new Uri("http://www.guiaskater.com/spots/skatepark-monte-grande.html"); ILinkCrawlerService linkCrawler = new LinkCrawlerService(new HttpHelper()); // Act Link link = linkCrawler.CrawlHttpResource(endpoint); // Assert Assert.IsTrue(link.Description.Contains("skate")); }
public void LinkCrawlerMetadataShould_BeProperlyDecoded_ForCronica() { // Arrange Uri endpoint = new Uri("http://www.cronica.com.ar/diario/2012/07/30/30541-delpo-quiere-meterse-en-la-tercera-ronda.html"); ILinkCrawlerService linkCrawler = new LinkCrawlerService(new HttpHelper()); // Act Link link = linkCrawler.CrawlHttpResource(endpoint); // Assert Assert.IsTrue(link.Description.Contains("cómodamente")); }