Example #1
0
 public void TestSetIsEnabled_newEvent()
 {
     var anEvent = new Event();
     anEvent.SetIsEnabled(true);
     Assert.AreEqual(anEvent.IsEnabled, true);
 }
Example #2
0
        public void TestSetIsEnabled_withFutureEventOccurrenceEnabled()
        {
            var anEvent = new Event();
            anEvent.Id = 1;
            anEvent.IsEnabled = true;

            var occurrence = new EventOccurrence();
            occurrence.IsEnabled = true;

            occurrence.AddOccurrenceDate(DateTime.Now.AddDays(5), DateTime.Now.AddDays(6));

            anEvent.EventOccurrences.Add(occurrence);

            var disabled = false;
            anEvent.SetIsEnabled(disabled);
        }