Ejemplo n.º 1
0
        public void DeleteEventsByTitleMethodWhenSuchTitleNoExistTest()
        {
            EventsManagerFast eventsManager = new EventsManagerFast();
            DateTime date = new DateTime(2002, 01, 02, 02, 02, 02);
            CalendarEvent singleEvent = new CalendarEvent(date, "Title", null);

            eventsManager.AddEvent(singleEvent);
            int numberOfDeletedEvents = eventsManager.DeleteEventsByTitle("exam");
            Assert.AreEqual(0, numberOfDeletedEvents);
        }
Ejemplo n.º 2
0
        public void DeleteEventsByTitleMethodCheckTitlesCollectionTest()
        {
            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);

            eventsManager.AddEvent(firstEvent);
            eventsManager.AddEvent(secondEvent);

            int numberOfDeletedEvents = eventsManager.DeleteEventsByTitle("Title");

            Assert.AreEqual(2, numberOfDeletedEvents);
        }