예제 #1
0
        public void Map_doctor_persistance_to_doctor_entity_when_persistance_is_null()
        {
            DoctorPersistence doctorPersistance = null;

            Assert.Throws <ArgumentNullException>(()
                                                  => DoctorMapper.MapDoctorPersistenceToDoctorEntity(doctorPersistance));
        }
예제 #2
0
 public Doctor GetDoctorById(Guid id)
 {
     using (MQuinceDbContext _context = new MQuinceDbContext(_dbContext))
     {
         var doctor = _context.Doctors.Include("Specialization").SingleOrDefault(c => c.Id.Equals(id));
         return(DoctorMapper.MapDoctorPersistenceToDoctorEntity(doctor));
     }
 }
예제 #3
0
        public void Map_doctor_persistence_to_doctor_entity()
        {
            DoctorPersistence doctorPersistance = this.GetDoctorPersistanceFirst();

            Doctor doctorEntity = DoctorMapper.MapDoctorPersistenceToDoctorEntity(doctorPersistance);

            Assert.True(this.IsEqualDoctorPersistanceAndDoctorEntity(doctorPersistance, doctorEntity));
        }