public async Task SendHttpAsync_ThrowsTimeout_WhenOperationCanceled() { var handler = new TimeoutDelegatingHandler(); var options = new DatasyncClientOptions { HttpPipeline = new HttpMessageHandler[] { handler } }; var client = new WrappedHttpClient(Endpoint, options); var request = new HttpRequestMessage(HttpMethod.Get, ""); await Assert.ThrowsAsync <TimeoutException>(() => client.WrappedSendAsync(request)).ConfigureAwait(false); }
public async Task SendServiceAsync_ThrowsTimeout_WhenOperationCanceled() { var handler = new TimeoutDelegatingHandler(); var options = new DatasyncClientOptions { HttpPipeline = new HttpMessageHandler[] { handler } }; var client = new WrappedHttpClient(Endpoint, options); var request = new ServiceRequest { Method = HttpMethod.Get, UriPathAndQuery = "/tables/movies/" }; await Assert.ThrowsAsync <TimeoutException>(() => client.WrappedSendAsync(request)).ConfigureAwait(false); }