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