コード例 #1
0
        public void CostEstimateNoCoverageTest()
        {
            CostEstimates costEstimates      = new CostEstimates();
            var           costEstimateParams = GetCoverageDependentParams();

            costEstimateParams["member_id"]      = "ERROR_034";
            costEstimateParams["service_type"]   = "4";
            costEstimateParams["network"]        = "IN";
            costEstimateParams["provider_price"] = "99.00";

            try
            {
                costEstimates.Get(costEstimateParams);
            }
            catch (EligibleService.Exceptions.EligibleException ex)
            {
                Assert.IsNotNull(ex.EligibleError.EligibleId);
                Assert.IsNotNull(ex.EligibleError.CreatedAt);
                Assert.AreEqual("api_error", ex.EligibleError.Errors[0].Code);
                Assert.AreEqual("The payer did not return coverage information for the service type requested.", ex.EligibleError.Errors[0].Message);
                Assert.AreEqual(null, ex.EligibleError.Errors[0].ExpectedValue);
                Assert.AreEqual(null, ex.EligibleError.Errors[0].Param);
                Assert.AreEqual(null, ex.EligibleError.Errors[0].Path);
                Assert.AreEqual(false, ex.EligibleError.Success);
            }
        }
コード例 #2
0
        public void CostEstimateProviderPriseNotFoundTest()
        {
            CostEstimates costEstimates      = new CostEstimates();
            var           costEstimateParams = GetCoverageDependentParams();

            costEstimateParams["member_id"]    = "ERROR_034";
            costEstimateParams["service_type"] = "4";
            costEstimateParams["network"]      = "IN";

            try
            {
                costEstimates.Get(costEstimateParams);
            }
            catch (EligibleService.Exceptions.EligibleException ex)
            {
                Assert.IsNotNull(ex.EligibleError.EligibleId);
                Assert.IsNotNull(ex.EligibleError.CreatedAt);
                Assert.AreEqual("invalid_request_error", ex.EligibleError.Errors[0].Code);
                Assert.AreEqual("provider_price should be present and should be a valid price", ex.EligibleError.Errors[0].Message);
                Assert.AreEqual(null, ex.EligibleError.Errors[0].ExpectedValue);
                Assert.AreEqual("provider_price", ex.EligibleError.Errors[0].Param);
                Assert.AreEqual(null, ex.EligibleError.Errors[0].Path);
                Assert.AreEqual(false, ex.EligibleError.Success);
            }
        }
コード例 #3
0
 public void Setup()
 {
     BaseTestClass.SetConfiguration();
     costEstimates = new CostEstimates();
 }
コード例 #4
0
 public void Setup()
 {
     costEstimates = new CostEstimates();
     restClient    = new Mock <IRequestExecute>();
     param         = new Hashtable();
 }
コード例 #5
0
 public void Setup()
 {
     costEstimates = new CostEstimates();
     restClient = new Mock<IRequestExecute>();
     param = new Hashtable();
 }
コード例 #6
0
 public void Setup()
 {
     BaseTestClass.SetConfiguration();
     costEstimates = new CostEstimates();
 }