public void Should_not_have_error_when_email_is_correct_format() { var model = new LoginModel(); model.Email = "*****@*****.**"; _validator.ShouldNotHaveValidationErrorFor(x => x.Email, model); }
public void ShouldNotHaveErrorWhenEmailIsCorrectFormat() { var model = new LoginModel { Email = "*****@*****.**" }; _validator.ShouldNotHaveValidationErrorFor(x => x.Email, model); }
public void Should_not_have_error_when_email_is_correct_format() { var model = new LoginViewModel { Email = "*****@*****.**" }; _validator.ShouldNotHaveValidationErrorFor(x => x.Email, model); }
public void Should_not_have_error_when_email_is_null_but_usernames_are_enabled() { _customerSettings = new CustomerSettings(); _customerSettings.UsernamesEnabled = true; _validator = new LoginValidator(_localizationService, _customerSettings); var model = new LoginModel(); model.Email = null; _validator.ShouldNotHaveValidationErrorFor(x => x.Email, model); }
public void Should_not_have_error_when_email_is_null_but_usernames_are_enabled() { _userSettings = new UserSettings { UsernamesEnabled = true }; _validator = new LoginValidator(_userSettings); var model = new LoginViewModel { Email = null }; _validator.ShouldNotHaveValidationErrorFor(x => x.Email, model); }
public void ShouldNotHaveErrorWhenEmailIsNullButUsernamesAreEnabled() { var customerSettings = new CustomerSettings { UsernamesEnabled = true }; _validator = new LoginValidator(GetService <ILocalizationService>(), customerSettings); var model = new LoginModel { Email = null }; _validator.ShouldNotHaveValidationErrorFor(x => x.Email, model); }