public void Map_doctor_persistance_to_doctor_entity_when_persistance_is_null() { DoctorPersistence doctorPersistance = null; Assert.Throws <ArgumentNullException>(() => DoctorMapper.MapDoctorPersistenceToDoctorEntity(doctorPersistance)); }
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)); } }
public void Map_doctor_persistence_to_doctor_entity() { DoctorPersistence doctorPersistance = this.GetDoctorPersistanceFirst(); Doctor doctorEntity = DoctorMapper.MapDoctorPersistenceToDoctorEntity(doctorPersistance); Assert.True(this.IsEqualDoctorPersistanceAndDoctorEntity(doctorPersistance, doctorEntity)); }