示例#1
0
        public void InsertTemplateScheduleTest()
        {
            List <TemplateSchedule> templateSchedules = _templateScheduleRepository.GetAllTemplateSchedules().ToList();
            int numberOfCurrentTemplateSchedules      = templateSchedules.Count;
            TemplateSchedule templateSchedule         = new TemplateSchedule(4, "DummySchedule", 1);

            _templateScheduleRepository.AddTemplateScheduleToDatabase(templateSchedule);
            Assert.AreNotEqual(numberOfCurrentTemplateSchedules, _templateScheduleRepository.GetAllTemplateSchedules().Count());
        }
示例#2
0
        public void GetAllTemplateSchedulesTest()
        {
            _templateScheduleRepository = new TemplateScheduleRepository();
            List <TemplateSchedule> templateSchedules = _templateScheduleRepository.GetAllTemplateSchedules().ToList();

            Assert.IsNotNull(templateSchedules);
        }
示例#3
0
        public List <TemplateSchedule> GetAllTemplateSchedules()
        {
            List <TemplateSchedule> templateSchedules = _templateScheduleRepository.GetAllTemplateSchedules().ToList();

            templateSchedules.ForEach(x => x.TemplateShifts = _templateShiftController.GetTemplateShiftsByTemplateScheduleId(x.Id));
            return(templateSchedules);
        }