public PrescriptionsController(
     IPrescriptionsService prescriptionsService,
     IPatientsService patientsService,
     IDoctorsService doctorsService)
 {
     this.prescriptionsService = prescriptionsService;
     this.patientsService      = patientsService;
     this.doctorsService       = doctorsService;
 }
        public BaseTestClass()
        {
            var options = new DbContextOptionsBuilder <ApplicationDbContext>()
                          .UseInMemoryDatabase(Guid.NewGuid().ToString());

            this.EventsRepository        = new EfDeletableEntityRepository <CalendarEvent>(new ApplicationDbContext(options.Options));
            this.ConsultationsRepository = new EfDeletableEntityRepository <Consultation>(new ApplicationDbContext(options.Options));
            this.DoctorsRepository       = new EfDeletableEntityRepository <Doctor>(new ApplicationDbContext(options.Options));
            this.UsersRepository         = new EfDeletableEntityRepository <ApplicationUser>(new ApplicationDbContext(options.Options));
            this.PatientsRepository      = new EfDeletableEntityRepository <Patient>(new ApplicationDbContext(options.Options));
            this.PrescribtionsRepository = new EfDeletableEntityRepository <Prescription>(new ApplicationDbContext(options.Options));

            this.EmailSender   = new SendGridEmailSender("test");
            this.EmailsService = new EmailsService(this.EmailSender);

            this.DoctorsService = new DoctorsService(
                this.DoctorsRepository,
                this.UsersRepository,
                this.EmailsService,
                this.PatientsRepository);

            this.PatientsService = new PatientsService(this.PatientsRepository);

            this.ConsultationsService = new ConsultationsService(
                this.DoctorsRepository,
                this.ConsultationsRepository,
                this.PatientsRepository,
                this.EmailsService,
                this.DoctorsService,
                this.PatientsService);

            this.EventsService = new EventsService(
                this.EventsRepository,
                this.ConsultationsRepository,
                this.DoctorsService,
                this.PatientsService,
                this.EmailsService);

            this.PrescriptionsService = new PrescriptionsService(this.PrescribtionsRepository);
        }