Exemple #1
0
        /// <summary>
        /// Retrieve Single Claim Acknowledgements
        /// https://gds.eligibleapi.com/rest#claim_and_reports_claim_acknowledgements_retrieve_single
        /// </summary>
        /// <param name="referenceId"></param>
        /// <returns>It returns all acknowledgements of a claim in sorted order by creation time.</returns>
        public ClaimAcknowledgementsResponse GetClaimAcknowledgements(string referenceId, RequestOptions options = null)
        {
            response = ExecuteObj.Execute(Path.Combine(EligibleResources.PathToClaims, referenceId, EligibleResources.ClaimAcknowledgementsPath), SetRequestOptionsObject(options));
            ClaimAcknowledgementsResponse formattedResponse = RequestProcess.ResponseValidation <ClaimAcknowledgementsResponse, EligibleError>(response);

            formattedResponse.SetJsonResponse(response.Content);
            return(formattedResponse);
        }
Exemple #2
0
        public void ClaimAcknowledgementsTest()
        {
            ClaimAcknowledgementsResponse actualResponse = claim.GetClaimAcknowledgements("12121212");

            string expectedResponse = TestHelper.GetJson(TestResource.ExpectedResponse + "ClaimAcknowledgements.json");

            TestHelper.CompareProperties(expectedResponse, actualResponse.JsonResponse());

            ClaimAcknowledgementsResponse expectedObj = JsonConvert.DeserializeObject <ClaimAcknowledgementsResponse>(expectedResponse);
            ClaimAcknowledgementsResponse actualObj   = JsonConvert.DeserializeObject <ClaimAcknowledgementsResponse>(actualResponse.JsonResponse());

            TestHelper.PropertyValuesAreEquals(actualObj, expectedObj);
        }
Exemple #3
0
        public void ClaimAcknowledgementsTest()
        {
            restClient.Setup(x => x.Execute(It.IsAny <string>(), It.IsAny <RequestOptions>(), It.IsAny <Hashtable>()))
            .Returns(new RestResponse()
            {
                StatusCode = HttpStatusCode.OK,
                Content    = TestHelper.GetJson(TestResource.MocksPath + "ClaimAcknowledgements.json")
            });

            claim.ExecuteObj = restClient.Object;
            var acknowledgements = claim.GetClaimAcknowledgements("12121212");

            Fixture fixture = new Fixture();
            ClaimAcknowledgementsResponse sut = fixture.Create <ClaimAcknowledgementsResponse>();

            TestHelper.PropertiesAreEqual(sut, acknowledgements.JsonResponse());
        }