Esempio n. 1
0
        public void Map_worktime_persistence_collection_to_worktime_entity_collection_when_persistance_collection_is_null()
        {
            List <WorkTimePersistence> listOfPersistance = null;

            Assert.Throws <ArgumentNullException>(()
                                                  => WorkTimeMapper.MapWorkTimePersistenceCollectionToWorkTimeEntityCollection(listOfPersistance));
        }
Esempio n. 2
0
 public IEnumerable <WorkTime> GetWorkTimesForDoctor(Guid doctorId)
 {
     using (MQuinceDbContext _context = new MQuinceDbContext(_dbContext))
     {
         var workTimes = _context.WorkTimes.Where(entity => entity.Doctor.Id == doctorId);
         return(WorkTimeMapper.MapWorkTimePersistenceCollectionToWorkTimeEntityCollection(workTimes.ToList()));
     }
 }
Esempio n. 3
0
        public void Map_worktime_persistence_collection_to_worktime_entity_collection()
        {
            List <WorkTimePersistence> listOfPersistance = this.GetListOfWorkTimePersistance();

            List <WorkTime> listOfWorkTime = WorkTimeMapper.MapWorkTimePersistenceCollectionToWorkTimeEntityCollection(listOfPersistance).ToList();

            Assert.True(IsEqualWorkTimePersistanceAndWorkTimeEntity(listOfPersistance[0], listOfWorkTime[0]));
            Assert.True(IsEqualWorkTimePersistanceAndWorkTimeEntity(listOfPersistance[1], listOfWorkTime[1]));
        }