예제 #1
0
        /// <summary>
        /// Reads the patient information, schedule and prints the consultation
        /// information.
        /// </summary>
        public static void ReadPatientInformationAndSchedule()
        {
            Console.Clear();
            Patient patient = PatientService.AddPatientInformationFromUser();

            AddPatient(patient);
            Consultation consultation = SchedulingService.GetInstance().Schedule(patient, 0);

            ConsultationService.AddConsultation(consultation);
            ConsultationHelper.PrintConsultationInfo(consultation);
        }
예제 #2
0
        public void Setup()
        {
            _mocker = AutoMock.GetLoose();
            _mocker.Mock <IMapperFactory>().Setup(x => x.Get <Endpoint, AllowedEndpointResponse>()).Returns(_mocker.Create <AllowedEndpointResponseMapper>());
            _testConference = ConsultationHelper.BuildConferenceForTest();

            _mocker.Mock <IConferenceCache>().Setup(cache =>
                                                    cache.GetOrAddConferenceAsync(_testConference.Id,
                                                                                  It.IsAny <Func <Task <ConferenceDetailsResponse> > >()))
            .Callback(async(Guid anyGuid, Func <Task <ConferenceDetailsResponse> > factory) => await factory())
            .ReturnsAsync(_testConference);

            _controller = _mocker.Create <EndpointsController>();
        }
예제 #3
0
 /// <summary>
 /// Displays all the consulations in the hospital.
 /// </summary>
 public static void ShowConsultations()
 {
     Console.Clear();
     if (HospitalConfiguration.GetInstance().Consultations.Count() == 0)
     {
         Console.WriteLine("No scheduled consultations yet.");
         return;
     }
     HospitalConfiguration.GetInstance().Consultations.ForEach(consultation => ConsultationHelper.PrintConsultationInfo(consultation));
 }