public ValidEmailRule(TContext context, Func <TContext, string> func, string ruleName = null, IRule parentRule = null) { if (string.IsNullOrEmpty(ruleName)) { RuleName = this.NamespaceName(); } _context = context; _func = func; Message = new InvalidEmail(); ParentRule = parentRule; }
public async Task SetsTheEmailFieldWhenInvalidCredentialsAreProvided() { arrangeCallToPasswordManagerWithInvalidCredentials(); var observer = TestScheduler.CreateObserver <string>(); ViewModel.Email.Subscribe(observer); await ViewModel.StartPasswordManager(); TestScheduler.Start(); observer.Messages.AssertEqual( ReactiveTest.OnNext(1, Email.Empty.ToString()), ReactiveTest.OnNext(2, InvalidEmail.ToString()) ); }
public string this[string name] { get { string result = null; switch (name) { case "Email": IsInputValid = IsEmailAddressValid(out string errorMessage); result = errorMessage; InvalidEmail?.Invoke(this, new EventArgs()); break; } return(result); } }
public FeedbackFormPage InputInvalidEmailAdress(InvalidEmail email) { enterEmaitText.SendKeys(email.EmailAdress); return(this); }
public void TestInvalidEmailSingle() { InvalidEmail emailSettings = new InvalidEmail(); InvalidEmail validEmail = ValidateSettings <InvalidEmail> .Validate(emailSettings); }