Example #1
0
        public void Set_random_general_practitioner()
        {
            using (var context = new MyDbContext(_options))
            {
                SetupDatabase(context);
                HospitalApp.Services.DoctorService  doctorService = new HospitalApp.Services.DoctorService(context);
                HospitalApp.Services.PatientService service       = new HospitalApp.Services.PatientService(context, doctorService);
                PatientDto patient = service.GetById(12);
                Patient    k       = PatientAdapter.PatientDtoToPatient(patient);

                service.GiveRandomGeneralPractitioner(k);

                Assert.NotNull(k.GeneralPractitionerId);
            }
        }