public void ExecutingClearHolidayCommandRemovesSelectedDaysFromEmployee() { var testDay = new Day {Date = new DateTime(2015, 8, 1), HolidayReason = new HolidayReason()}; _holidays.Add(testDay); _calendar.SetDate(2015,8); _employeeCalendar.SelectedDays.Add(_employeeCalendar.EmployeeDays.First(x=>x.Date == testDay.Date)); _employeeCalendar.ClearHolidayCommand.Execute(null); Assert.AreEqual(0, _holidays.Count); }
public void Initialize() { _calendar = new Calendar(); _calendar.SetDate(2015, 9); _holidays = new List<Day>(); _employee = new Employee {FirstName="Joe", FamilyName = "Doe", Holidays = _holidays}; _dayViewModelObservableCollection = new EmployeeDayViewModelObservableCollection(_employee, _calendar); _sampleHoliday = new Day { Date = new DateTime(2015, 8, 15), HolidayReason = new HolidayReason() }; }
public DayViewModel(Day day) { Date = day.Date; _holidayReason = day.HolidayReason; }