public void IsThisAlgorithm_NullInput_Throws() { // Arrange var algorithm = new SHA384(); // Act && Assert Assert.Throws <ArgumentNullException>(() => algorithm.IsThisAlgorithm(null)); }
public void IsThisAlgorithm_InvalidInput_ReturnsFalse() { // Arrange var algorithm = new SHA384(); // Act var isThisAlgorithm = algorithm.IsThisAlgorithm("not an SHA384 hash"); // Assert Assert.False(isThisAlgorithm); }
public void IsThisAlgorithm_ValidInput_ReturnsTrue() { // Arrange var algorithm = new SHA384(); // Act var hash = algorithm.CreateHash("Hello world"); var isThisAlgorithm = algorithm.IsThisAlgorithm(hash); // Assert Assert.True(isThisAlgorithm); }