Exemple #1
0
        public GetProblemDataResponse GetProblem(GetProblemDataRequest request)
        {
            GetProblemDataResponse response = new GetProblemDataResponse();
            ILookUpRepository      repo     = Factory.GetRepository(request, RepositoryType.LookUp);

            response.Problem = repo.FindProblemByID(request.ProblemID) as ProblemData;
            return(response);
        }
Exemple #2
0
        public void GetProblemByID_Test()
        {
            // Arrange
            double version                = 1.0;
            string contractNumber         = "InHealth001";
            string context                = "NG";
            GetProblemDataRequest request = new GetProblemDataRequest {
                ProblemID = "528a6709d4332317acc50962", Context = context, ContractNumber = contractNumber, Version = version
            };

            LookUpDataManager lm = new LookUpDataManager {
                Factory = new LookUpRepositoryFactory()
            };
            // Act
            GetProblemDataResponse response = lm.GetProblem(request);

            // Assert
            Assert.IsTrue(response.Problem.Name == "CKD");
        }
Exemple #3
0
        public GetProblemDataResponse Get(GetProblemDataRequest request)
        {
            GetProblemDataResponse response = new GetProblemDataResponse();

            try
            {
                if (string.IsNullOrEmpty(request.UserId))
                {
                    throw new UnauthorizedAccessException("LookUpDD:Get()::Unauthorized Access");
                }

                response         = LookUpDataManager.GetProblem(request);
                response.Version = request.Version;
            }
            catch (Exception ex)
            {
                CommonFormatter.FormatExceptionResponse(response, base.Response, ex);

                string aseProcessID = ConfigurationManager.AppSettings.Get("ASEProcessID") ?? "0";
                Common.Helper.LogException(int.Parse(aseProcessID), ex);
            }
            return(response);
        }