public Notification ValidatePhoneNumber(string cellPhoneToValidate) { ICellPhoneValidator cellPhoneValidator = Account.GetCellPhoneValidator(CurrentCountry); Notification notification = cellPhoneValidator.ValidateCellPhone(cellPhoneToValidate); return(notification); }
public Notification AddAccount(Account account) { Notification notification; ICellPhoneValidator cellPhoneValidator = Account.GetCellPhoneValidator(account.AccountCountry); notification = cellPhoneValidator.ValidateCellPhone(account.AccountCellPhoneNumber); if (!notification.HasErrors()) { Add(account); notification.AddSuccess("Cuenta creada con éxito"); } return(notification); }
public void GetCellPhoneValidatorTest() { ICellPhoneValidator cellPhoneValidator = Account.GetCellPhoneValidator(new Country("URUGUAY")); Assert.AreEqual(new UyCellPhoneValidator().CellPhoneValidatorCountry, cellPhoneValidator.CellPhoneValidatorCountry); }
public string FormatPhoneNumber(string cellPhoneToFormat) { ICellPhoneValidator cellPhoneValidator = Account.GetCellPhoneValidator(CurrentCountry); return(cellPhoneValidator.StandarizePhoneNumber(cellPhoneToFormat)); }