Exemplo n.º 1
0
        public void PrecertificationInquiryTest()
        {
            PrecertificationInquiryResponse response = precertification.Inquiry(PrecertificationParams());
            string expectedResponse = TestHelper.GetJson(TestResource.ExpectedResponse + "PrecertificationInquiry.json");

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

            PrecertificationInquiryResponse expectedObj = JsonConvert.DeserializeObject <PrecertificationInquiryResponse>(expectedResponse);
            PrecertificationInquiryResponse actualObj   = JsonConvert.DeserializeObject <PrecertificationInquiryResponse>(response.JsonResponse());

            TestHelper.PropertyValuesAreEquals(actualObj, expectedObj);
        }
Exemplo n.º 2
0
        public void GetAllPrecertificationsTest()
        {
            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 + "PreCertification.json")
            });

            precertification.ExecuteObj = restClient.Object;
            var response = precertification.Inquiry(param);

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

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