public async Task SendAsyncTest() { HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "http://foo.com"); ClientHttpCryptoHandler handler = _provider.GetService <ClientHttpCryptoHandler>(); handler.InnerHandler = new TestHandler(); HttpMessageInvoker invoker = new HttpMessageInvoker(handler); HttpResponseMessage result = await invoker.SendAsync(request, CancellationToken.None); Assert.Equal("test-response", await result.Content.ReadAsStringAsync()); }
public void ClientHttpCryptoHandlerTest() { ClientHttpCryptoHandler handler = _provider.GetService <ClientHttpCryptoHandler>(); Assert.NotNull(handler); }