private MockDownloadJob GetJob_FailedDownload_NetFailed(string songHash, string songDir) { Exception downloadException = new WebClientException("404: Not Found"); DownloadResult downloadResult = new DownloadResult(@"C:\Test", DownloadResultStatus.NetFailed, 404, "404: Not Found", downloadException); ZipExtractResult zipResult = null; var finalResult = new JobResult() { SongHash = songHash, DownloadResult = downloadResult, ZipResult = zipResult, SongDirectory = songDir }; var job = new MockDownloadJob(songHash, finalResult); return(job); }
private MockDownloadJob GetJob_FailedDownload_IOFailed(string songHash, string songDir) { Exception downloadException = new IOException(); DownloadResult downloadResult = new DownloadResult(@"C:\Test", DownloadResultStatus.IOFailed, 200, "IOFailed", downloadException); ZipExtractResult zipResult = null; var finalResult = new JobResult() { SongHash = songHash, DownloadResult = downloadResult, ZipResult = zipResult, SongDirectory = songDir }; var job = new MockDownloadJob(songHash, finalResult); return(job); }
private MockDownloadJob GetJob_Successful(string songHash, string songDir) { var downloadResult = new DownloadResult(@"C:\Test", DownloadResultStatus.Success, 200); var zipResult = new ZipExtractResult() { ResultStatus = ZipExtractResultStatus.Success }; var finalResult = new JobResult() { SongHash = songHash, DownloadResult = downloadResult, ZipResult = zipResult, SongDirectory = songDir }; var job = new MockDownloadJob(songHash, finalResult); return(job); }
private MockDownloadJob GetJob_FailedExtraction_Source(string songHash, string songDir) { var downloadResult = new DownloadResult(@"C:\Test", DownloadResultStatus.Success, 200); Exception zipException = new IOException(); var zipResult = new ZipExtractResult() { ResultStatus = ZipExtractResultStatus.SourceFailed, Exception = zipException }; var finalResult = new JobResult() { SongHash = songHash, DownloadResult = downloadResult, ZipResult = zipResult, SongDirectory = null }; var job = new MockDownloadJob(songHash, finalResult); return(job); }