Example #1
0
        public void Map_pharmacy_persistence_to_pharmacy_entity_when_pharmacy_persistance_is_null()
        {
            PharmacyPersistence pharmacyPersistence = null;

            Assert.Throws <ArgumentNullException>(()
                                                  => PharmacyMapper.MapPharmacyPersistenceToPharmacyEntity(pharmacyPersistence));
        }
Example #2
0
 public MyPharmacy GetById(Guid id)
 {
     using (DataContext _context = new DataContext())
     {
         return(PharmacyMapper.MapPharmacyPersistenceToPharmacyEntity(_context.Pharmacies.SingleOrDefault(c => c.ApiKey.Equals(id))));
     }
 }
Example #3
0
        public void Map_pharmacy_persistence_to_pharmacy_entity()
        {
            PharmacyPersistence pharmacyPersistence = this.GetPharmacyPersistence();

            MyPharmacy pharmacy = PharmacyMapper.MapPharmacyPersistenceToPharmacyEntity(pharmacyPersistence);

            Assert.True(IsEqualPharmacyPersistanceAndPharmacyEntity(pharmacyPersistence, pharmacy));
        }