Ejemplo n.º 1
0
        public void EightEmployeesExistInTheDatabase()
        {
            List <Employee> employees = LogicAndDataAccess.GetAllEmployees();

            Assert.IsNotNull(employees);
            Assert.AreEqual(8, employees.Count);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Home Page to view all employees and approved cases
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            var homeViewModel = new HomeViewModel()
            {
                Employees = LogicAndDataAccess.GetAllEmployees().Select(e => new EmployeeViewModel(e)).ToList(),
                Cases     = LogicAndDataAccess.ViewApprovedCases().Select(c => new CaseViewModel(c)).ToList()
            };

            return(View(homeViewModel));
        }