mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-19 23:41:41 +02:00
NO ConfigureAwait(false) + cleanup
This commit is contained in:
@@ -41,7 +41,7 @@ message HelloReply {
|
||||
|
||||
// Act
|
||||
var api = RestClient.For<IWireMockAdminApi>(server.Url);
|
||||
var getMappingsResult = await api.GetMappingsAsync().ConfigureAwait(false);
|
||||
var getMappingsResult = await api.GetMappingsAsync();
|
||||
|
||||
await Verifier.Verify(getMappingsResult, VerifySettings);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ message HelloReply {
|
||||
|
||||
// Act
|
||||
var client = server.CreateClient();
|
||||
var getMappingsResult = await client.GetStringAsync("/__admin/mappings").ConfigureAwait(false);
|
||||
var getMappingsResult = await client.GetStringAsync("/__admin/mappings");
|
||||
|
||||
await Verifier.VerifyJson(getMappingsResult, VerifySettings);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ public partial class WireMockAdminApiTests
|
||||
Title = "test 2",
|
||||
Description = "description 2"
|
||||
};
|
||||
var result = await api.PostMappingsAsync(new[] { model1, model2 }).ConfigureAwait(false);
|
||||
var result = await api.PostMappingsAsync(new[] { model1, model2 });
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsNotNull();
|
||||
@@ -105,7 +105,7 @@ public partial class WireMockAdminApiTests
|
||||
Priority = 500,
|
||||
Title = "test"
|
||||
};
|
||||
var result = await api.PostMappingAsync(model).ConfigureAwait(false);
|
||||
var result = await api.PostMappingAsync(model);
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsNotNull();
|
||||
@@ -116,7 +116,7 @@ public partial class WireMockAdminApiTests
|
||||
Check.That(mapping).IsNotNull();
|
||||
Check.That(mapping.Title).Equals("test");
|
||||
|
||||
var response = await mapping.ProvideResponseAsync(new RequestMessage(new UrlDetails("http://localhost/1"), "GET", "")).ConfigureAwait(false);
|
||||
var response = await mapping.ProvideResponseAsync(new RequestMessage(new UrlDetails("http://localhost/1"), "GET", ""));
|
||||
Check.That(response.Message.StatusCode).Equals(expectedStatusCode);
|
||||
|
||||
server.Stop();
|
||||
|
||||
Reference in New Issue
Block a user