public void Setup() { claim = new Claim(); restClient = new Mock <IRequestExecute>(); param = new Hashtable(); paramValues = new ClaimParams(); }
public void ClaimCreationWithClaimParamsObjectTest() { ClaimParams input = JsonConvert.DeserializeObject <ClaimParams>(ClaimInput); RequestOptions options = new RequestOptions(); options.IsTest = true; ClaimResponse actualResponse = claim.Create(input, options); ClaimSuccessCheck(actualResponse.JsonResponse()); }
public void ClaimExceptionTest() { ClaimParams input = JsonConvert.DeserializeObject <ClaimParams>(ClaimInput); input.Claim.ServiceLines[0].RenderingProvider.Npi = "Invalid NPI"; RequestOptions options = new RequestOptions(); options.IsTest = true; try { ClaimResponse actualResponse = claim.Create(input, options); } catch (EligibleService.Exceptions.EligibleException ex) { string response = TestHelper.GetJson(TestResource.MocksPath + "ClaimFailure.json"); TestHelper.PropertiesAreEqual(ex.EligibleError, ex.Message); } }
/// <summary> /// Claim submission with ClaimParam object /// https://gds.eligibleapi.com/rest#claim_and_reports_create_a_claim /// </summary> /// <param name="claimParams">Please refer Eligible REST doc for claim parameter details</param> /// <returns></returns> public ClaimResponse Create(ClaimParams claimParams, RequestOptions options = null) { return(this.Create(JsonSerialize(claimParams), options)); }