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); }
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)); }
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); }
public void OnSuccessWithResponse(CoverageResponse response) { this.OnCoverageDidComplete?.Invoke(response); }