Example #1
0
        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);
        }
Example #2
0
        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
            });
        }
Example #3
0
        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
            });
        }