public void DownDataSync_file_exists_yes() { DownloaderData dd = new DownloaderData(Constants.Ftp.Files.File_1_1); dd.StartDownload(async: false); byte[] file_ftp = IO.File.ReadAllBytes(Constants.HDFtp.Files.File_1_1.FullName); Assert.IsTrue(StructuralComparisons.StructuralEqualityComparer.Equals(file_ftp, dd.DownloadedData)); }
public void DownDataSync_file_exists_no() { DownloaderData dd = new DownloaderData(Constants.Ftp.Files.NotExists); try { dd.StartDownload(async: false); Assert.IsTrue(false); } catch (Exception e) { Assert.IsTrue(e is System.Net.WebException); Assert.IsTrue(true); } }