public async Task Disposes_HttpClient_it_creates_on_dispose() { var connection = new HttpClientAuthenticationConnection(); connection.Dispose(); await Assert.ThrowsAsync <ObjectDisposedException>(() => connection.GetAsync <string>(new Uri("https://www.auth0.com"))); }
public async Task Disposes_HttpClient_it_creates_on_dispose() { var connection = new HttpClientAuthenticationConnection(); connection.Dispose(); await Assert.ThrowsAsync <ObjectDisposedException>(() => connection.GetAsync <string>(new Uri("https://" + GetVariable("AUTH0_AUTHENTICATION_API_URL")))); }
public async Task Does_not_dispose_HttpClient_it_was_given_on_dispose() { var httpClient = new HttpClient(); var apiConnection = new HttpClientAuthenticationConnection(httpClient); apiConnection.Dispose(); await httpClient.GetAsync(new Uri("https://www.auth0.com")); }
public async Task Does_not_dispose_HttpClient_it_was_given_on_dispose() { var httpClient = new HttpClient(); var apiConnection = new HttpClientAuthenticationConnection(httpClient); apiConnection.Dispose(); await httpClient.GetAsync(new Uri("https://" + GetVariable("AUTH0_AUTHENTICATION_API_URL"))); }
public TestHttpClientAuthenticationConnection(HttpMessageHandler handler) { _connection = new HttpClientAuthenticationConnection(handler); }
public TestHttpClientAuthenticationConnection(HttpClient httpClient = null) { _connection = new HttpClientAuthenticationConnection(httpClient); }