Esempio n. 1
0
        public void Should_not_have_error_when_email_is_correct_format()
        {
            var model = new LoginModel();

            model.Email = "*****@*****.**";
            _validator.ShouldNotHaveValidationErrorFor(x => x.Email, model);
        }
Esempio n. 2
0
        public void ShouldNotHaveErrorWhenEmailIsCorrectFormat()
        {
            var model = new LoginModel
            {
                Email = "*****@*****.**"
            };

            _validator.ShouldNotHaveValidationErrorFor(x => x.Email, model);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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);
        }
Esempio n. 7
0
        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);
        }