示例#1
0
        public void InvalidBaseUrlOptionTest()
        {
            Eligible       config  = Eligible.Instance;
            RequestOptions options = new RequestOptions();

            options.IsTest  = true;
            options.ApiKey  = config.ApiKey;
            options.BaseUrl = "https://www.example.com/";
            Hashtable input = JsonConvert.DeserializeObject <Hashtable>(ClaimInput);

            ClaimResponse actualResponse = claim.Create(input, options);
        }
示例#2
0
        public void SubmitClaimWithHashtableTest()
        {
            restClient.Setup(x => x.ExecutePostPut(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <RequestOptions>(), It.IsAny <Method>()))
            .Returns(new RestResponse()
            {
                StatusCode = HttpStatusCode.OK,
                Content    = TestHelper.GetJson(TestResource.MocksPath + "ClaimSuccess.json")
            });


            claim.ExecuteObj = restClient.Object;
            var calimSuccessResponse = claim.Create(param);

            PerformClaimCreationTest(calimSuccessResponse.JsonResponse());
        }
示例#3
0
        public void Create_WithTypeProperty()
        {
            // Act
            Claim claim = Claim.Create <IClaimType2>(new MyClaimType());

            // Assert
            Assert.Equal("my-claim-type-2", claim.ClaimType);
            Assert.Equal("my-claim-value-2", claim.Value);
        }
示例#4
0
        public void ClaimCreationWithHasParamTest()
        {
            Hashtable input = JsonConvert.DeserializeObject <Hashtable>(ClaimInput);

            ClaimResponse actualResponse = claim.Create(input);

            ClaimSuccessCheck(actualResponse.JsonResponse());
        }