Ejemplo n.º 1
0
        public void TestGetAgenda()
        {
            Event hackathon = new Event("hackathon");

            hackathon.StartTime = new DateTime(2020, 02, 13);
            hackathon.EndTime   = new DateTime(2020, 02, 15);

            Event rentree = new Event("rentrée");

            rentree.StartTime = new DateTime(2019, 12, 09);
            rentree.EndTime   = new DateTime(2019, 12, 10);

            List <Event> events = new List <Event>();

            events.Add(rentree);
            events.Add(hackathon);

            AbstractPerson person = new AbstractPerson();

            person.Agenda = events;

            DateTime date1 = new DateTime(2019, 01, 10);
            DateTime date2 = new DateTime(2020, 03, 10);

            Assert.AreEqual("rentrée\nhackathon\n", person.GetEvents(date1, date2, events));
        }