public void DesktopGitInstallerHashCorrectnessTest() { var page = new DesktopPage(driver); TestSupport support = new TestSupport(); support.DownloadFileWebClient(page.GetFileLinkPath(page), gitDesktopInstallerFileName); try { string installerPath = support.GetDownloadedFileFullName(gitDesktopInstallerFileName); Assert.IsTrue(support.ComputeFileHash(installerPath, true) == installerGITDesktopSHA1Expected && support.ComputeFileHash(installerPath, false) == installerGITDesktopMD5Expected); } catch (System.IO.FileNotFoundException ex) { Assert.Fail(ex.StackTrace); } }
public string GetFileLinkPath(DesktopPage page) { return(downloadBtn.GetAttribute("href")); }