mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-23 00:38:28 +02:00
Add .ConfigureAwait(false); to the await Task calls (#704)
Add .ConfigureAwait(false); to the await Task calls
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
@@ -70,8 +70,8 @@ namespace WireMock.Net.Tests
|
||||
};
|
||||
|
||||
// Assert
|
||||
var response = await new HttpClient().SendAsync(request);
|
||||
string content = await response.Content.ReadAsStringAsync();
|
||||
var response = await new HttpClient().SendAsync(request).ConfigureAwait(false);
|
||||
string content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
|
||||
response.StatusCode.Should().Be(HttpStatusCode.OK);
|
||||
content.Should().Be("a-response");
|
||||
@@ -118,8 +118,8 @@ namespace WireMock.Net.Tests
|
||||
};
|
||||
|
||||
// Assert
|
||||
var response = await new HttpClient().SendAsync(request);
|
||||
string content = await response.Content.ReadAsStringAsync();
|
||||
var response = await new HttpClient().SendAsync(request).ConfigureAwait(false);
|
||||
string content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
|
||||
response.StatusCode.Should().Be(HttpStatusCode.OK);
|
||||
content.Should().Be("a-response");
|
||||
@@ -151,8 +151,8 @@ namespace WireMock.Net.Tests
|
||||
};
|
||||
|
||||
// Assert
|
||||
var response = await new HttpClient().SendAsync(request);
|
||||
string content = await response.Content.ReadAsStringAsync();
|
||||
var response = await new HttpClient().SendAsync(request).ConfigureAwait(false);
|
||||
string content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
|
||||
response.StatusCode.Should().Be(HttpStatusCode.OK);
|
||||
content.Should().Be("a-response");
|
||||
@@ -185,8 +185,8 @@ namespace WireMock.Net.Tests
|
||||
};
|
||||
|
||||
// Assert
|
||||
var response = await new HttpClient().SendAsync(request);
|
||||
string content = await response.Content.ReadAsStringAsync();
|
||||
var response = await new HttpClient().SendAsync(request).ConfigureAwait(false);
|
||||
string content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
|
||||
response.StatusCode.Should().Be(HttpStatusCode.OK);
|
||||
content.Should().Be("a-response");
|
||||
|
||||
Reference in New Issue
Block a user