public bool Valid(string accountId, string password, string otp) { var dbPassword = _profile.GetPassword(accountId); var hashedPassword = _hash.GetPassword(password); var currentOtp = _otpService.GetCurrent(accountId); var isValid = dbPassword == hashedPassword && otp == currentOtp; return(isValid); }
private void GivenOtp(string accountId, string otp) { _otpService.GetCurrent(accountId).ReturnsForAnyArgs(otp); }