Exemplo n.º 1
0
        public void ClaimMutlipleAcknowledgementsWithRequiredParamsTest()
        {
            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 + "MultipleAcknowledgements.json")
            });


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

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

            TestHelper.PropertiesAreEqual(sut, acknowledgements.JsonResponse());
        }
Exemplo n.º 2
0
        public void ClaimMultipleAcknowledgementsTest()
        {
            Hashtable input = new Hashtable();

            input.Add("internal_id", "12345");
            input.Add("submission_status", "accepted");
            input.Add("claim_submitted_date", "2014-02-15");

            MultipleAcknowledgementsResponse actualResponse = claim.GetClaimAcknowledgements(input);

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

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

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

            TestHelper.PropertyValuesAreEquals(actualObj, expectedObj);
        }