Example #1
0
        public void TestDeleteAppointment()
        {
            DateTime     now            = DateTime.Now;
            DateTime     dt             = new DateTime(now.Year, now.Month, now.Day, now.Hour, now.Minute, 0); // important to use 0 for seconds since dbmanager doesn't store seconds
            Event        e              = new Event("testEvent", dt, "testDescription");
            List <Event> events_initial = SqlClass.GetEvents(dt);

            SqlClass.AddEvent(e);
            SqlClass.DeleteAppointment(e);
            List <Event> events_after = SqlClass.GetEvents(dt);

            Assert.AreEqual(events_initial.Count, events_after.Count);
        }