Esempio n. 1
0
        public void ShouldNotHaveErrorsWhenPasswordComplexitySatisfied(string password)
        {
            // Arrange.
            var viewModel = new PasswordResetViewModel {
                Password = password, ConfirmPassword = password
            };
            var validator = new PasswordResetViewModelClientValidator();

            // Act.
            validator.Validate(viewModel);

            // Assert.
            validator.ShouldNotHaveValidationErrorFor(x => x.Password, viewModel);
        }
Esempio n. 2
0
        public void ShouldNotHaveErrorWhenValidPasswordResetCodeIsSpecified(string passwordResetCode)
        {
            // Arrange.
            var viewModel = new PasswordResetViewModel
            {
                PasswordResetCode = passwordResetCode
            };

            var validator = new PasswordResetViewModelClientValidator();

            // Act.
            validator.Validate(viewModel);

            // Assert.
            validator.ShouldNotHaveValidationErrorFor(x => x.PasswordResetCode, viewModel);
        }