示例#1
0
        public void PresetHolidaysTest()
        {
            Calendar.NET.Calendar c = new Calendar.NET.Calendar();
            c.GetEvents().Clear();
            c.PresetHolidays();
            List <IEvent> events = c.GetEvents();

            Assert.AreEqual(events[0].EventText, "April Fools Day");
        }
示例#2
0
        public void AddEventTest()
        {
            Calendar.NET.Calendar c = new Calendar.NET.Calendar();
            c.GetEvents().Clear();
            var exerciseEvent = new CustomEvent
            {
                StartDate          = DateTime.Now,
                EndDate            = DateTime.Now,
                RecurringFrequency = RecurringFrequencies.Monthly,
                EventLengthInHours = 1,
                Alert     = 1,
                EventText = "event1",
                EventFont = new Font(FontFamily.GenericSansSerif, 12.0f, FontStyle.Regular)
            };

            c.AddEvent(exerciseEvent, false);
            Assert.AreEqual(c.GetEvents().Count, 1);
        }