コード例 #1
0
 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");
     }
 }
コード例 #2
0
 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");
     }
 }
コード例 #3
0
 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");
     }
 }
コード例 #4
0
 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");
     }
 }