public void Map_pharmacy_persistence_to_pharmacy_entity_when_pharmacy_persistance_is_null()
        {
            PharmacyPersistence pharmacyPersistence = null;

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

            MyPharmacy pharmacy = PharmacyMapper.MapPharmacyPersistenceToPharmacyEntity(pharmacyPersistence);

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