public void SchedulerMonthModelConstructorTest()
 {
     SchedulerMonthModel target = new SchedulerMonthModel(displayInfo, date);
     Assert.AreEqual(6, target.Weeks.Length, "Weeks array must have 6 items.");
 }
        public void SetMonthRangeTest()
        {
            SchedulerMonthModel target = new SchedulerMonthModel(displayInfo, date);
            try
            {
                target.PropertyChanged += new PropertyChangedEventHandler(OnPropertyChanged);

                PreparePropertyChangedTest();
                target.SetDate(date, date, date);
                Assert.AreEqual(5, target.DisplayedWeeks, "DisplayedWeeks must be set 5.");
                Assert.IsTrue(NotifiedProperties.Contains("DisplayedWeeks"), "PropertyChanged event wasn't raised on property 'DisplayedWeeks' changing to 5.");

                PreparePropertyChangedTest();
                target.SetDate(date.AddDays(40), date, date);
                Assert.AreEqual(4, target.DisplayedWeeks, "DisplayedWeeks must be set 4.");
                Assert.IsTrue(NotifiedProperties.Contains("DisplayedWeeks"), "PropertyChanged event wasn't raised on property 'DisplayedWeeks' changing to 4.");
            }
            finally
            {
                target.PropertyChanged -= new PropertyChangedEventHandler(OnPropertyChanged);
            }
        }
 public void SetTodayTest()
 {
     SchedulerMonthModel target = new SchedulerMonthModel(displayInfo, date);
     target.SetToday(date.AddDays(1));
     Assert.IsFalse(target.Weeks[0].Days[0].IsToday, "IsToday must be set to false.");
 }