public void GivenUrl_ForAnHtmlPage_ShouldDownloadAllImages()
        {
            var downloader       = new SuperImageDownloader(new TestHtmlRetriever(), new ImageParser(), new ImageRetriever(new TestImageProvider(), new SystemThreadTaskHandler()));
            var downloadedImages = downloader.Download(UrlForTestHtmlPage);

            downloadedImages.ShouldMatch(GetImagesInTestHtmlPage());
        }
Пример #2
0
 public void SetUp()
 {
     parser         = MockRepository.GenerateMock <IImageParser>();
     htmlRetriever  = MockRepository.GenerateMock <IHtmlRetriever>();
     imageRetriever = MockRepository.GenerateMock <IImageRetriever>();
     downloader     = new SuperImageDownloader(htmlRetriever, parser, imageRetriever);
 }