public void EmptyPasswordHashTest() { var passwordService = new HMACSHA512PasswordService(); Assert.Throws <ArgumentException>(() => { passwordService.HashPassword(null); }); }
public void WrongPasswordTest() { var passwordService = new HMACSHA512PasswordService(); var password = passwordService.HashPassword("test"); Assert.NotNull(password); var correct = passwordService.CheckPassword("test2", password); Assert.False(correct); }