[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); }
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); }