Beispiel #1
0
        public void BuildsRequestMessage()
        {
            var url   = $"{Urls.SignatureDocuments}/{Guid.NewGuid()}";
            var token = "access-token";

            var request = HttpRequestor.GetRequestMessage(url, HttpMethod.Get, token);

            Assert.IsNotNull(request);

            Assert.AreEqual(new Uri(url), request.RequestUri);

            Assert.AreEqual($"Bearer {token}", request.Headers.GetValues("Authorization").FirstOrDefault());

            Assert.AreEqual($".NET {SignicatConfiguration.SdkVersion}",
                            request.Headers.GetValues("X-Signicat-Express-SDK").FirstOrDefault());

            Assert.AreEqual(HttpMethod.Get, request.Method);
        }