Exemplo n.º 1
0
        public void AddRangeToSelectionTest()
        {
            DateTime date1 = new DateTime(2021, 3, 10);

            calendar.SelectDate(date1);
            DateTime date2 = new DateTime(2021, 3, 15);
            DateTime date3 = new DateTime(2021, 3, 17);

            DateTime[] dates = new DateTime[] { date2, date3 };
            calendar.AddRangeToSelection(dates);
            DateTime[] selectedDates = calendar.SelectedDates;
            Assert.That(selectedDates, Has.Length.EqualTo(3));
            Assert.That(selectedDates[0], Is.EqualTo(date1));
            Assert.That(selectedDates[1], Is.EqualTo(date2));
            Assert.That(selectedDates[2], Is.EqualTo(date3));
        }