コード例 #1
0
        public void RetrieveCoverageForDependentTest()
        {
            CoverageResponse response         = coverage.All(GetCoverageDependentParams());
            string           expectedResponse = TestHelper.GetJson(TestResource.ExpectedResponse + "CoverageSubscriber.json");

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

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

            TestHelper.PropertyValuesAreEquals(actualObj, expectedObj);
        }
コード例 #2
0
        public void ReturnOnlyInsuranceTest()
        {
            var coverageParams = GetCoverageDependentParams();

            coverageParams["return_only"] = "insurance";
            CoverageResponse response = coverage.All(coverageParams);

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

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

            TestHelper.PropertyValuesAreEquals(response.Insurance, expectedObj.Insurance);
            TestHelper.CompareProperties(JsonConvert.SerializeObject(expectedObj), JsonConvert.SerializeObject(actualObj));
        }
コード例 #3
0
        public void CoveragePlanFinancialStopLossTest()
        {
            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 + "Coverage.json")
            });


            coverage.ExecuteObj = restClient.Object;
            CoverageResponse coverageResponse = coverage.All(param);
            Plan             expectedCoverage = CoveragePlanExpectedResults.GetExpectedCoveragePlan();

            TestHelper.PropertyValuesAreEquals(coverageResponse.Plan.Financials.StopLoss, expectedCoverage.Financials.StopLoss);
        }
コード例 #4
0
 public void OnSuccessWithResponse(CoverageResponse response)
 {
     this.OnCoverageDidComplete?.Invoke(response);
 }