public Result <Pharmacy> GetById(Guid id) { return(pharmacyRepository .GetById(id) .ToResult("Pharmacy not found") .Map(pharmacy => pharmacy.ToModel())); }
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)); }