Esempio n. 1
0
        public void GetCalendarData_selectedDepartmentNull_AllEmployeesAbsences()
        {
            //Arrange
            List <DateTime> expHolidaysList = controller.GetHolidaysData();
            string          fromDate        = "01.01.2010";
            string          toDate          = "31.12.2016";

            //Act
            var result = controller.GetCalendarData(fromDate, toDate, null) as PartialViewResult;

            //Assert
            Assert.IsInstanceOf(typeof(PartialViewResult), result);
            Assert.IsInstanceOf(typeof(List <CalendarRowViewModel>), result.Model);
            Assert.AreEqual("", result.ViewName);
            Assert.IsInstanceOf(typeof(List <DateTime>), result.ViewBag.Holidays);
            Assert.AreEqual(expHolidaysList, result.ViewBag.Holidays);
        }