public void EmptyPasswordCheckTest() { var passwordService = new HMACSHA512PasswordService(); Assert.Throws <ArgumentException>(() => { passwordService.CheckPassword(null, "asfdasdfas"); }); }
public void EmptyHashCheckTest() { var passwordService = new HMACSHA512PasswordService(); Assert.Throws <ArgumentException>(() => { passwordService.CheckPassword("test", 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); }