public void GetAllCohorts_Test() { // Arrange double version = 1.0; string contractNumber = "InHealth001"; string context = "NG"; GetAllCohortsDataRequest request = new GetAllCohortsDataRequest { Context = context, ContractNumber = contractNumber, Version = version }; // Act GetAllCohortsDataResponse response = DataCohortManager.GetCohorts(request); // Assert Assert.AreNotEqual(0, response.Cohorts.Count); }
public void GetCohortByID_Test() { // Arrange double version = 1.0; string contractNumber = "InHealth001"; string context = "NG"; GetCohortDataRequest request = new GetCohortDataRequest { CohortID = "528aa055d4332317acc50978", Context = context, ContractNumber = contractNumber, Version = version }; // Act GetCohortDataResponse response = DataCohortManager.GetCohortByID(request); // Assert Assert.IsTrue(response.Cohort.SName == "All(f)"); }
public GetAllCohortsDataResponse Get(GetAllCohortsDataRequest request) { GetAllCohortsDataResponse response = new GetAllCohortsDataResponse(); try { if (string.IsNullOrEmpty(request.UserId)) { throw new UnauthorizedAccessException("CohortDD:Get()::Unauthorized Access"); } response = DataCohortManager.GetCohorts(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); }