Example #1
0
        public void Map_patient_persistence_to_patient_entity_when_patient_persistance_is_null()
        {
            PatientPersistence patientPersistance = null;

            Assert.Throws <ArgumentNullException>(()
                                                  => PatientMapper.MapPatientPersistenceToPatientEntity(patientPersistance));
        }
Example #2
0
 public Patient GetPatientById(Guid id)
 {
     using (MQuinceDbContext _context = new MQuinceDbContext(_dbContext))
     {
         var patient = _context.Patients.Include("DoctorPersistance").SingleOrDefault(c => c.Id.Equals(id));
         return(PatientMapper.MapPatientPersistenceToPatientEntity(patient));
     }
 }
Example #3
0
        public void Map_patient_persistence_to_patient_entity()
        {
            PatientPersistence patientPersistence = this.GetPatientPersistence();

            Patient patient = PatientMapper.MapPatientPersistenceToPatientEntity(patientPersistence);

            Assert.True(IsEqualPatientPersistanceAndPatientEntity(patientPersistence, patient));
        }