コード例 #1
0
        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;
        }
コード例 #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())
                    );
            }
コード例 #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);
            }
        }
コード例 #4
0
 public FeedbackFormPage InputInvalidEmailAdress(InvalidEmail email)
 {
     enterEmaitText.SendKeys(email.EmailAdress);
     return(this);
 }
コード例 #5
0
ファイル: EmailTest.cs プロジェクト: k3ldar/AppSettings
 public void TestInvalidEmailSingle()
 {
     InvalidEmail emailSettings = new InvalidEmail();
     InvalidEmail validEmail    = ValidateSettings <InvalidEmail> .Validate(emailSettings);
 }