Esempio n. 1
0
 public Result <Pharmacy> GetById(Guid id)
 {
     return(pharmacyRepository
            .GetById(id)
            .ToResult("Pharmacy not found")
            .Map(pharmacy => pharmacy.ToModel()));
 }
Esempio n. 2
0
        public void Get_by_id_returns_pharmacy()
        {
            pharmacyRepository.GetById(Guid.Parse("51d5a046-bc14-4cce-9ab0-222565f50526")).Returns(this.GetFirstPharmacy());

            IdentifiableDTO <PharmacyDTO> pharmacy = pharmacyService.GetByApi(Guid.Parse("51d5a046-bc14-4cce-9ab0-222565f50526"));

            Assert.True(this.ComparePharmacyAndIdentifierPharmacy(this.GetFirstPharmacy(), pharmacy));
        }