public void Map_patient_persistance_collection_to_patient_entity_collection_when_collection_is_null()
        {
            List <PatientPersistence> listOfPatientPersistance = null;

            Assert.Throws <ArgumentNullException>(()
                                                  => PatientMapper.MapPatientPersistenceCollectionToPatientEntityCollection(listOfPatientPersistance));
        }
Example #2
0
 public IEnumerable <Patient> GetAllPatients()
 {
     using (MQuinceDbContext _context = new MQuinceDbContext(_dbContext))
     {
         return(PatientMapper.MapPatientPersistenceCollectionToPatientEntityCollection(_context.Patients.ToList()));
     }
 }
        public void Map_patient_persistance_collection_to_patient_entity_collection()
        {
            List <PatientPersistence> patientPersistences = this.GetListOfPatientPersistance();

            List <Patient> listOfPatients = PatientMapper.MapPatientPersistenceCollectionToPatientEntityCollection(patientPersistences).ToList();

            Assert.True(this.IsEqualPatientPersistanceAndPatientEntity(patientPersistences[0], listOfPatients[0]));
            Assert.True(this.IsEqualPatientPersistanceAndPatientEntity(patientPersistences[1], listOfPatients[1]));
        }