private CCGEntity SetupMockCCGRepoResult() { var repoResult = new CCGEntity { Postcode = "XXX", App = "some app", STP = "some stp", STPId = "5678", CCG = "some ccg", CCGId = "1234" }; _mockccgRepo.Setup(r => r.Get(It.IsAny <string>())).Returns(Task.FromResult(repoResult)); return(repoResult); }
private CCGModel MapCcgToStp(CCGEntity ccg, STPEntity stp) { if (ccg == null || stp == null) { return(null); } return(new CCGModel { Postcode = ccg.Postcode, STP = stp.STPName, CCG = ccg.CCG, App = ccg.App, DOSSearchDistance = ccg.DOSSearchDistance }); }
private CCGDetailsModel DetailsMap(CCGEntity ccgEntity, STPEntity stpEntity) { if (ccgEntity == null || stpEntity == null) { return(null); } return(new CCGDetailsModel { App = stpEntity.ProductName, CCG = ccgEntity.CCG, Postcode = ccgEntity.Postcode, ReferralServiceIdWhitelist = new ServiceListModel(stpEntity.ReferralServiceIdWhitelist), PharmacyReferralServiceIdWhitelist = new ServiceListModel(stpEntity.PharmacyServiceIdWhitelist), STPName = stpEntity.STPName, DOSSearchDistance = ccgEntity.DOSSearchDistance }); }