/// <summary>
        /// Obtiene el json de clientes para permitir el filtrado de la información por socio
        /// </summary>
        /// <returns></returns>
        public JsonResult GetEmployees()
        {
            EmployeeRules employeeRules = new EmployeeRules();
            List <sel_empleado_new_result> listEmployees = employeeRules.getEmployees();

            return(Json(listEmployees));
        }
        public void ShouldExecuteAllEmployeeRulesAgainstAllEmployees()
        {
            //arrange
            List <Employee> employees = new EmployeeRepository().GetEmployeesWithDepartmentIDs();

            employees[2].DepartmentID = 0;  //change to a nonsense dept id so that one of the rules breaks
            List <Rule <Employee> > employeeRules = new EmployeeRules().GetAllRules();
            Employee lastEmployee = employees[2];

            //act
            bool allEmployeesAreValid = employees.All(e => employeeRules.All(r => r.Test(e)));
            IEnumerable <Rule <Employee> > failedEmployeeRules = employeeRules.Where(r => r.Test(lastEmployee) == false);
            string errorMessages = failedEmployeeRules.Aggregate(new StringBuilder(),
                                                                 (sb, r) => sb.AppendLine(r.Message),
                                                                 sb => sb.ToString());

            //assert
            allEmployeesAreValid.Should().BeFalse();
            errorMessages.Should().NotBeNullOrWhiteSpace();
            errorMessages.Should().Contain("Employee must have an assigned department");
        }