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()); }
public void GetAllTemplateSchedulesTest() { _templateScheduleRepository = new TemplateScheduleRepository(); List <TemplateSchedule> templateSchedules = _templateScheduleRepository.GetAllTemplateSchedules().ToList(); Assert.IsNotNull(templateSchedules); }
public List <TemplateSchedule> GetAllTemplateSchedules() { List <TemplateSchedule> templateSchedules = _templateScheduleRepository.GetAllTemplateSchedules().ToList(); templateSchedules.ForEach(x => x.TemplateShifts = _templateShiftController.GetTemplateShiftsByTemplateScheduleId(x.Id)); return(templateSchedules); }