public void GetMonthTest() { var months = DateTimeExtextions.GetFullMonthNames(); Assert.IsNotNull(months); Assert.IsTrue(months.Any()); Assert.IsTrue(months.Count == 12); }
public ActionResult Index(int month) { month = month <= 0 || month >= 13 ? 1 : month; var viewModel = new CalendarViewModel { Months = DateTimeExtextions.GetFullMonthNames(), SelectedMonth = month, AppointmentDetails = _mapper.Map <List <AppointmentViewModel> >(_appointmentService.GetAppointmetsByMonth(month).ToList()) }; return(View(viewModel)); }