public void GivenPasswordWithNoDigits_WhenValidateRegister_ThenReturnValidationErrors() { var command = RegisterConsultantCommandFactory.RegisterConsultantCommandWithNoDigitsPassword(); var result = _validator.TestValidate(command); result.IsValid.Should().BeFalse(); result.ShouldHaveAnyValidationError(); result.ShouldHaveValidationErrorFor(c => c.Password) .WithErrorMessage(ValidationErrors.NoDigitPassword); result.ShouldNotHaveValidationErrorFor(user => user.Email); result.ShouldNotHaveValidationErrorFor(user => user.Location); result.ShouldNotHaveValidationErrorFor(user => user.Username); }