public async Task TestDayTemplatePart2() { var inputMock = PrepareInput(); var objUnderTest = new DayTemplate(inputMock.Object); Assert.That(await objUnderTest.Part2(), Is.EqualTo(0)); }
private View CreateView(Day day) { var view = (View)DayTemplate.CreateContent(); view.BindingContext = day; view.GestureRecognizers.Add(BuildTapGesture(day)); return(view); }
public AppointmentViewModel() { _activeAppointment = new Appointment(); _activeAppointment.Colour = ""; _activeAppointment.Comments = ""; _activeAppointment.Cursor = ""; _activeAppointment.DoctorName = ""; _activeAppointment.EndTime = 0; _activeAppointment.Height = ""; _activeAppointment.ID = ""; _activeAppointment.Margin = ""; _activeAppointment.Missed = false; _activeAppointment.Opacity = ""; _activeAppointment.Patient = ""; _activeAppointment.RowSpan = ""; _activeAppointment.StartTime = 0; _activeAppointment.Type = ""; _activeAppointment.Waitlisted = false; _activeAppointment.Visibility = ""; _adm = new AppointmentDatabaseModel(); DT = new DayTemplate { StartTime = 700 }; _drScheduleMap = new Dictionary <int, List <Appointment> >(); _appointmentLookup = new Dictionary <int, Appointment>(); _pearsonAppointmentListArray = new List <Appointment> [_numDaysPopulated]; _specterAppointmentListArray = new List <Appointment> [_numDaysPopulated]; _paulsenAppointmentListArray = new List <Appointment> [_numDaysPopulated]; // set here for now instead of in DIVM. Not important until dynamic modification of three day view is required. _numAppointmentsPerDay = 48; _doctorsOnShift = new ObservableCollection <Doctor> { new Doctor(800, 1700) { DoctorName = "Dr. Pearson", Position = "0" }, new Doctor(830, 1730) { DoctorName = "Dr. Specter", Position = "1" }, new Doctor(730, 1630) { DoctorName = "Dr. Paulsen", Position = "2" } }; // Adding empty Days for each doctor in their schedule array where no corresponding fake appointments were made // Each column in the array is one day of appointments AddEmptyDaysToArray(_pearsonAppointmentListArray, 0); AddEmptyDaysToArray(_specterAppointmentListArray, 1); AddEmptyDaysToArray(_paulsenAppointmentListArray, 2); // Adding the days that are populated with fake appointments to their corresponding slot in the array. // 0 is the beginning of time. _pearsonAppointmentListArray[20] = _adm._pearsonNovember032017; _pearsonAppointmentListArray[21] = _adm._pearsonNovember042017; _pearsonAppointmentListArray[22] = _adm._pearsonNovember052017; _pearsonAppointmentListArray[23] = _adm._pearsonNovember062017; _pearsonAppointmentListArray[24] = _adm._pearsonNovember072017; _pearsonAppointmentListArray[25] = _adm._pearsonNovember082017; _pearsonAppointmentListArray[52] = _adm._pearsonDecember052017; _pearsonAppointmentListArray[62] = _adm._pearsonDecember152017; _pearsonAppointmentListArray[63] = _adm._pearsonDecember162017; _specterAppointmentListArray[20] = _adm._specterNovember032017; _specterAppointmentListArray[21] = _adm._specterNovember042017; _specterAppointmentListArray[22] = _adm._specterNovember052017; _specterAppointmentListArray[23] = _adm._specterNovember062017; _specterAppointmentListArray[24] = _adm._specterNovember072017; _specterAppointmentListArray[25] = _adm._specterNovember082017; _specterAppointmentListArray[52] = _adm._specterDecember052017; _specterAppointmentListArray[62] = _adm._specterDecember152017; _specterAppointmentListArray[63] = _adm._specterDecember162017; _paulsenAppointmentListArray[20] = _adm._paulsenNovember032017; _paulsenAppointmentListArray[21] = _adm._paulsenNovember042017; _paulsenAppointmentListArray[22] = _adm._paulsenNovember052017; _paulsenAppointmentListArray[23] = _adm._paulsenNovember062017; _paulsenAppointmentListArray[24] = _adm._paulsenNovember072017; _paulsenAppointmentListArray[25] = _adm._paulsenNovember082017; _paulsenAppointmentListArray[52] = _adm._paulsenDecember052017; _paulsenAppointmentListArray[62] = _adm._paulsenDecember152017; _paulsenAppointmentListArray[63] = _adm._paulsenDecember162017; _appointmentDictionary = new Dictionary <int, List <Appointment>[]> { { 0, _pearsonAppointmentListArray }, { 1, _specterAppointmentListArray }, { 2, _paulsenAppointmentListArray } }; // Deals with auto generating appointment lookup codes and binding codes for lists of appointments // to be used in accessing the dictionaries in the future. PopulateAppointmentDatabase(DT.StartTime); }
public DayTemplateModel(DayTemplate template) { templateId = template.Id; name = template.Name; routes = Mapper.Map <List <RouteBase>, List <RouteBaseModel> >(template.Routes.ToList()); }