Beispiel #1
0
        public void Map_specialization_persistance_collection_to_specialization_entity_collection_when_collection_is_null()
        {
            List <SpecializationPersistence> listOfSpecializationPersistance = null;

            Assert.Throws <ArgumentNullException>(()
                                                  => SpecializationMapper.MapSpecializationPersistenceCollectionToSpecializationEntityCollection(listOfSpecializationPersistance));
        }
 public IEnumerable <Specialization> GetAll()
 {
     using (MQuinceDbContext _context = new MQuinceDbContext(_dbContext))
     {
         return(SpecializationMapper.MapSpecializationPersistenceCollectionToSpecializationEntityCollection(_context.Specializations.ToList()));
     }
 }
Beispiel #3
0
        public void Map_specialization_persistance_collection_to_specialization_entity_collection()
        {
            List <SpecializationPersistence> specializationPersistences = this.GetListOfSpecificationPersistance();

            List <Specialization> listOfSpecialization = SpecializationMapper.MapSpecializationPersistenceCollectionToSpecializationEntityCollection(specializationPersistences).ToList();

            Assert.True(this.IsEqualSpecializationPersistanceAndSpecilizationEntity(specializationPersistences[0], listOfSpecialization[0]));
            Assert.True(this.IsEqualSpecializationPersistanceAndSpecilizationEntity(specializationPersistences[1], listOfSpecialization[1]));
        }