Exemplo n.º 1
0
        public void TestRemoveDate_DisablePricingSchedule()
        {
            var occurrence = new EventOccurrence() { Event = new Event() };
            occurrence.AddOccurrenceDate(new DateTime(2000, 1, 1), null);

            var earlySchedule = new PricingSchedule(10M, new DateTime(1999, 01, 01));
            occurrence.SetEarlyRegistrationPrice(earlySchedule);

            var lateSchedule = new PricingSchedule(10M, new DateTime(1999, 12, 01));
            occurrence.SetEarlyRegistrationPrice(earlySchedule);

            occurrence.EnablePricingSchedule();

            occurrence.RemoveOccurrenceDate(0);

            Assert.IsFalse(occurrence.IsPriceScheduleEnabled);
        }
Exemplo n.º 2
0
        public void TestRemoveDate()
        {
            var occurrence = new EventOccurrence() { Event = new Event() };
            occurrence.AddOccurrenceDate(new DateTime(2000, 1, 1), null);

            occurrence.RemoveOccurrenceDate(0);
            Assert.AreEqual(0, occurrence.EventOccurrenceDates.Count);

            Assert.Greater(occurrence.LastUpdated, DateTime.MinValue);
        }