public void ChangingHolidayReasonOnViewModelIsReflectedInEmployeeList()
        {
            _holidays.Add(_sampleHoliday);
            _calendar.SetDate(2015,8);

            var dayViewModelWithExistingHoliday = _dayViewModelObservableCollection.First(x => x.Date == _sampleHoliday.Date);
            var newHolidayReason = new HolidayReason {FullName = "New"};
            dayViewModelWithExistingHoliday.HolidayReason = newHolidayReason;

            Assert.AreEqual(_sampleHoliday.HolidayReason.FullName, newHolidayReason.FullName);
        }
Beispiel #2
0
 public DayViewModel(Day day)
 {
     Date = day.Date;
     _holidayReason = day.HolidayReason;
 }
 private void UpdateSelectedDaysWithReason(HolidayReason reason)
 {
     foreach (var day in SelectedDays)
     {
         day.HolidayReason = reason;
     }
 }