コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }