public void Sha384Hash_GetHash_Null_3() { IHash hashAlgo = new Sha384Hash(); Action action = () => hashAlgo.GetHash(null as FileInfo); action.Should().Throw <ArgumentNullException>(); }
public void Sha384Hash_GetHash_Empty() { IHash hashAlgo = new Sha384Hash(); Action action = () => hashAlgo.GetHash(string.Empty); action.Should().Throw <ArgumentNullException>(); }
public void Sha384Hash_GetHash_Valid_2() { IHash hashAlgo = new Sha384Hash(); HashResult hashResult = hashAlgo.GetHash(Data.ExpectedHashFilePath); hashResult.Algorithm.Should().Be(Hashing.ExpectedSha384Algorithm); hashResult.Value.Should().Be(Hashing.ExpectedSha384Hash); }
public void Sha384Hash_GetHash_Valid_1() { IHash hashAlgo = new Sha384Hash(); using FileStream fileStream = new(Data.ExpectedHashFilePath, FileMode.Open, FileAccess.Read, FileShare.Read); HashResult hashResult = hashAlgo.GetHash(fileStream); hashResult.Algorithm.Should().Be(Hashing.ExpectedSha384Algorithm); hashResult.Value.Should().Be(Hashing.ExpectedSha384Hash); }