public void Should_throw_exception_when_property_not_in_request_dictionary()
        {
            var request = new HttpRequestMessage(HttpMethod.Get, "http://somesite.com");

            var handler = new KinlySelfTestApiDelegatingHandler(_customJwtTokenProvider.Object)
            {
                InnerHandler = new FakeHttpMessageHandler()
            };

            var invoker = new HttpMessageInvoker(handler);

            Assert.ThrowsAsync <Exception>(() => invoker.SendAsync(request, new CancellationToken()));
        }
        public async Task Should_send_http_request()
        {
            var request = new HttpRequestMessage(HttpMethod.Get, "http://somesite.com");

            request.Properties.Add("participantId", Guid.NewGuid());

            var handler = new KinlySelfTestApiDelegatingHandler(_customJwtTokenProvider.Object)
            {
                InnerHandler = new FakeHttpMessageHandler()
            };

            var invoker  = new HttpMessageInvoker(handler);
            var response = await invoker.SendAsync(request, new CancellationToken());

            request.Headers.Authorization.Parameter.Should().Be(_stringToken);
            response.IsSuccessStatusCode.Should().BeTrue();
        }