public void Can_Remove_Variant() { DateTime now = DateTime.Now; var schedule = new ContentScheduleCollection(); schedule.Add(now, null); schedule.Add("en-US", now, null); IEnumerable <ContentSchedule> invariantSched = schedule.GetSchedule(string.Empty); schedule.Remove(invariantSched.First()); Assert.AreEqual(0, schedule.GetSchedule(string.Empty).Count()); Assert.AreEqual(1, schedule.FullSchedule.Count()); IEnumerable <ContentSchedule> variantSched = schedule.GetSchedule("en-US"); schedule.Remove(variantSched.First()); Assert.AreEqual(0, schedule.GetSchedule("en-US").Count()); Assert.AreEqual(0, schedule.FullSchedule.Count()); }
public void Can_Remove_Invariant() { var now = DateTime.Now; var schedule = new ContentScheduleCollection(); schedule.Add(now, null); var invariantSched = schedule.GetSchedule(string.Empty); schedule.Remove(invariantSched.First()); Assert.AreEqual(0, schedule.FullSchedule.Count()); }