public void DentistCreationWithoutReflectionTest() { FactoryMethod factory = DoctorFactory.GetFactory(); IPerson x = factory.GetPersonWithoutReflection(typeof(Pneumologist)); Assert.AreSame(x.GetType(), typeof(Pneumologist)); }
static Initializer() { doctorFactory = new DoctorFactory(); patientFactory = new PatientFactory(); analgeticFactory = new AnalgeticFactory(); antisepticFactory = new AntisepticFactory(); febrifugeFactory = new FebrifugeFactory(); }
public async Task <IEnumerable <Doctor> > GetDoctorsRepositoryAsync(DoctorsType doctorsType) { DoctorFactory doctorFactory = new DoctorFactory(_context); var doctors = await doctorFactory.GetDoctors(doctorsType); return(doctors); }
public IAppointmentFactory WithDoctor(Action <DoctorFactory> doctor) { var doctorFactory = new DoctorFactory(); doctor(doctorFactory); this.doctor = doctorFactory.Build(); return(this); }
private static void CreateDoctorInternalDatabase(ApplicationDbContext dbContext) { _doctor1 = DoctorFactory.Create( 1, "Bernard", "Verdriet", new DateTime(1964, 03, 21), new DateTime(2004, 10, 31), "Doctorlaan", 23, "5502HK", "Los Doctores", "Canada", DoctorTypeEnum.KNOarts); _doctor2 = DoctorFactory.Create( 2, "Philip", "McGraw", new DateTime(1955, 06, 12), new DateTime(2014, 11, 08), "Fill-avenue", 23, "8000AB", "New York", "NewYork State", DoctorTypeEnum.Oorarts); var doctorList = new List<Doctor> { _doctor1, _doctor2 }; foreach (var doctor in doctorList) { dbContext.Doctors.Add(doctor); // voeg toe aan intern-memory DB dbContext.SaveChanges(); } }