private IEnumerable <Slot> GetSlots(string project, DateTime start, DateTime end) { TimeModel timeService = TimeModel.getService(); if (!timeService.GetProjects().Contains(project)) { return(timeService.GetSlots(start, end)); } return(timeService.GetSlots(project, start, end)); }
public IEnumerable <Slot> GetSlots(string project) { TimeModel timeService = TimeModel.getService(); if (!timeService.GetProjects().Contains(project)) { return(timeService.GetSlots()); } return(timeService.GetSlots(project)); }
public IEnumerable <Slot> GetSlots() { TimeModel timeService = TimeModel.getService(); var slots = timeService.GetSlots(); return(slots); }
// Warning: Assumes that is run after the previous test. // TODO: Remove when lifecycle can be completed. public void SlotStorageData() { // Arrange TimeModel timeRepository = TimeModel.getService(); var lastEntry = new Slot(1, new DateTime(2018, 5, 2, 9, 00, 00), new DateTime(2018, 5, 2, 18, 00, 00), "Just a timeslot", "Test"); // Act var slots = timeRepository.GetSlots(); // Assert //Assert.AreEqual(expectedType, slots.ToString()); IEnumerator <Slot> iter = slots.GetEnumerator(); iter.MoveNext(); Assert.AreEqual(lastEntry, iter.Current); }