コード例 #1
0
ファイル: ClaimTests.cs プロジェクト: muness/eligible-CSharp
 public void Setup()
 {
     claim       = new Claim();
     restClient  = new Mock <IRequestExecute>();
     param       = new Hashtable();
     paramValues = new ClaimParams();
 }
コード例 #2
0
        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());
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
 /// <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));
 }