public void ListEventsWithMoreElementsThanWishedTest() { EventsManagerFast eventsManager = new EventsManagerFast(); DateTime firstDate = new DateTime(2002, 01, 02, 02, 02, 02); CalendarEvent firstEvent = new CalendarEvent(firstDate, "Title", null); DateTime secondDate = new DateTime(2003, 01, 02, 02, 02, 02); CalendarEvent secondEvent = new CalendarEvent(secondDate, "Title", null); DateTime thirdDate = new DateTime(2003, 01, 02, 02, 02, 02); CalendarEvent thirdEvent = new CalendarEvent(thirdDate, "Title", null); eventsManager.AddEvent(firstEvent); eventsManager.AddEvent(secondEvent); eventsManager.AddEvent(thirdEvent); DateTime startDate = new DateTime(2001, 01, 02, 00, 00, 00); IEnumerable<CalendarEvent> resultList = eventsManager.ListEvents(startDate, 2); int count = 0; foreach (var ev in resultList) { count = count + 1; } Assert.AreEqual(2, count); }
public void ListEventWith1000CountTest() { EventsManagerFast eventsManager = new EventsManagerFast(); DateTime startDate = new DateTime(2005, 01, 02, 00, 00, 00); IEnumerable<CalendarEvent> resultList = eventsManager.ListEvents(startDate, 1000); }
public void ListEventsWhenNoExistTest() { EventsManagerFast eventsManager = new EventsManagerFast(); DateTime startDate = new DateTime(2001, 01, 02, 00, 00, 00); IEnumerable<CalendarEvent> resultList = eventsManager.ListEvents(startDate, 2); int count = 0; foreach (var ev in resultList) { count = count + 1; } Assert.AreEqual(0, count); }