public bool Verify(string accountId, string actualPassword, string actualOneTimePassword) { string expectPassword = _profileRepo.GetUserPassword(accountId); actualPassword = _hashedAdapter.GetHashedActualPassword(actualPassword); var expectOneTImePassword = _otpService.GetOneTimePassword(accountId); if (actualPassword == expectPassword && actualOneTimePassword == expectOneTImePassword) { return(true); } else { _notifyAdapter.Notify(); return(false); } }
private void GivenHashed(string password, string hashedPassword) { _hashedAdapter.GetHashedActualPassword(password).ReturnsForAnyArgs(hashedPassword); }