Пример #1
0
        public void Map_admin_persistance_to_admin_entity_when_persistance_is_null()
        {
            AdminPersistence adminPersistance = null;

            Assert.Throws <ArgumentNullException>(()
                                                  => AdminMapper.MapAdminPersistenceToAdminEntity(adminPersistance));
        }
Пример #2
0
 public Admin GetAdminById(Guid id)
 {
     using (MQuinceDbContext _context = new MQuinceDbContext(_dbContext))
     {
         return(AdminMapper.MapAdminPersistenceToAdminEntity(_context.Admin.SingleOrDefault(c => c.Id.Equals(id))));
     }
 }
Пример #3
0
        public void Map_admin_persistence_to_admin_entity()
        {
            AdminPersistence adminPersistance = this.GetAdminPersistanceFirst();

            Admin adminEntity = AdminMapper.MapAdminPersistenceToAdminEntity(adminPersistance);

            Assert.True(this.IsEqualAdminPersistanceAndAdminEntity(adminPersistance, adminEntity));
        }