public void Validate_Email_and_DOB_NotValid([ValueSource(nameof(customerRequestEmailDOBNotValid))] CustomerRequest customerRequestNotValid) { var customerValidator = new CustomerRequestValidator(); customerValidator.ShouldHaveValidationErrorFor(x => x.EmailAddress, new CustomerRequest { EmailAddress = customerRequestNotValid.EmailAddress, DOB = customerRequestNotValid.DOB }); customerValidator.ShouldHaveValidationErrorFor(x => x.DOB, new CustomerRequest { EmailAddress = customerRequestNotValid.EmailAddress, DOB = customerRequestNotValid.DOB }); }
public void Validate_PolicyNumber_NotValid(string policynumber) { var customerValidator = new CustomerRequestValidator(); customerValidator.ShouldHaveValidationErrorFor(a => a.PolicyReferenceNumber, new CustomerRequest { PolicyReferenceNumber = policynumber }); }
public void Validate_SurName_NotValid(string surName) { var customerValidator = new CustomerRequestValidator(); customerValidator.ShouldHaveValidationErrorFor(a => a.SurName, new CustomerRequest { SurName = surName }); }
public void Validate_FirstName_NotValid(string firstName) { var customerValidator = new CustomerRequestValidator(); customerValidator.ShouldHaveValidationErrorFor(a => a.FirstName, new CustomerRequest { FirstName = firstName }); }
public void Validate_DOB_NotValid([ValueSource(nameof(notValidDOBList))] DateTime notValidDOBDate) { var customerValidator = new CustomerRequestValidator(); customerValidator.ShouldHaveValidationErrorFor(a => a.DOB, new CustomerRequest { DOB = notValidDOBDate }); }
public void Validate_Email_NotValid(string email) { var customerValidator = new CustomerRequestValidator(); customerValidator.ShouldHaveValidationErrorFor(a => a.EmailAddress, new CustomerRequest { EmailAddress = email }); }