public async Task CheckFileHashFailTest() { // Arrange var handler = new BCryptHash(workFactor); // Act bool matches = await handler.CheckFileHashAsync(filename, failHash); // Assert Assert.IsFalse(matches); }
public async Task GetAndCheckFileHashTest() { // Arrange var handler = new BCryptHash(workFactor); // Act string hash = await handler.GetFileHashAsync(filename); bool matches = await handler.CheckFileHashAsync(filename, hash); // Assert Assert.IsTrue(matches); }