public void WriteSha1HashWhenHashFileExists() { using (TemporaryFileHolder file = new TemporaryFileHolder(this.filePath, string.Empty), hashFile = new TemporaryFileHolder(this.hashFilePath, string.Empty)) { this.testee.WriteSha1HashFile(this.filePath); Assert.AreEqual(EmptyFileHash, this.testee.ReadSha1HashFile(this.filePath), "The hash file was not overwritten with the correct hash value"); } }
public void ReadSha1Hash() { using (TemporaryFileHolder file = new TemporaryFileHolder(this.filePath, string.Empty), hashFile = new TemporaryFileHolder(this.hashFilePath, EmptyFileHash)) { string sha1 = this.testee.ReadSha1HashFile(this.filePath); Assert.AreEqual(EmptyFileHash, sha1, "The hash value read from the hash file is wrong"); } }