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;
        }
Example #2
0
            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())
                    );
            }
Example #3
0
        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);
            }
        }
Example #4
0
 public FeedbackFormPage InputInvalidEmailAdress(InvalidEmail email)
 {
     enterEmaitText.SendKeys(email.EmailAdress);
     return(this);
 }
Example #5
0
 public void TestInvalidEmailSingle()
 {
     InvalidEmail emailSettings = new InvalidEmail();
     InvalidEmail validEmail    = ValidateSettings <InvalidEmail> .Validate(emailSettings);
 }