public static Downloader CreateDownloader() { var httpConnector = new HttpConnector(); var htmlParser = new HtmlParser(); var filesWriterReader = new FilesWriterReader(); var mp3FilesAdapter = new Mp3FilesAdapter(filesWriterReader); return(new Downloader(httpConnector, htmlParser, mp3FilesAdapter)); }
public static Downloader CreateTestDownloaderWithErrors() { var httpConnector = new HttpFakeConnectorDownloadStreamError(); //var httpConnector = new HttpFakeConnectorConnectionErrors(); var htmlParser = new HtmlParser(); var filesWriterReader = new FilesWriterReader(); var mp3FilesAdapter = new Mp3FilesAdapter(filesWriterReader); return(new Downloader(httpConnector, htmlParser, mp3FilesAdapter)); }