Ejemplo n.º 1
0
        public void EmployeeValidator_ShouldHaveRules()
        {
            var employeeValidator = new EmployeeValidator();

            employeeValidator.ShouldHaveValidationErrorFor(v => v.FirstName, null as string);
            employeeValidator.ShouldHaveValidationErrorFor(v => v.PersonType, Domain.Enums.PersonType.Dependent);
            employeeValidator.ShouldHaveChildValidator(v => v.Dependents, typeof(DependentValidator));
        }