public void CanCreateValidVerificationRequest() { var request = VerificationRequest.GenerateNewVerificationRequest("userId", VerificationType.Email, VerificationCode.Generate()); request.Should().NotBeNull(); request.Attempts.Should().Be(0); request.Status.Should().Be(VerificationRequestStatus.Pending); request.ExpiryDate.Should().BeAfter(DateTime.UtcNow); }
public void VerificationCodeCannotBeNull() { Assert.Throws <ArgumentNullException>(() => VerificationRequest.GenerateNewVerificationRequest("userId", VerificationType.PhoneCall, null)); }
public void UserIdCannotBeNullOrEmpty(string userId) { Assert.Throws <ArgumentNullException>(() => VerificationRequest.GenerateNewVerificationRequest(userId, VerificationType.Email, null)); }