Ejemplo n.º 1
0
 public DownloadManager(IDownloadDirectory aDownloadDirectory, IUrlFetcher aUrlFetcher)
 {
     iDownloadDirectory = aDownloadDirectory;
     iMessageQueue = new Channel<Action<IDownloadThread>>(5);
     var urlPoller = new DefaultUrlPoller();
     var pollManager = new PollManager(urlPoller);
     iDownloader = new Downloader(iDownloadDirectory, iMessageQueue, pollManager, aUrlFetcher);
     iDownloadThread = new CommunicatorThread(iDownloader.Run, "DownloadManager");
     iDownloadThread.Start();
 }
Ejemplo n.º 2
0
 public void SetUp()
 {
     iMockUrlPoller = new Mock<IUrlPoller>();
     iPollManager = new PollManager(iMockUrlPoller.Object);
 }