示例#1
0
        [Test, Category("DDay")] //Category(("Event")]
        public void Remove1()
        {
            IICalendar iCal = new iCalendar();

            DDayEvent evt = new DDayEvent();
            evt.Summary = "Testing";
            evt.Start = new iCalDateTime(2010, 3, 25);
            evt.End = new iCalDateTime(2010, 3, 26);

            iCal.Events.Add(evt);
            Assert.AreEqual(1, iCal.Children.Count);
            Assert.AreSame(evt, iCal.Children[0]);

            iCal.RemoveChild(evt);
            Assert.AreEqual(0, iCal.Children.Count);
            Assert.AreEqual(0, iCal.Events.Count);
        }
示例#2
0
        public void Remove1()
        {
            IICalendar iCal = new iCalendar();

            Event evt = new Event();

            evt.Summary = "Testing";
            evt.Start   = new iCalDateTime(2010, 3, 25);
            evt.End     = new iCalDateTime(2010, 3, 26);

            iCal.Events.Add(evt);
            Assert.AreEqual(1, iCal.Children.Count);
            Assert.AreSame(evt, iCal.Children[0]);

            iCal.RemoveChild(evt);
            Assert.AreEqual(0, iCal.Children.Count);
            Assert.AreEqual(0, iCal.Events.Count);
        }