Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Stef Heyenrath
2026-08-19 19:15:03 +02:00
committed by GitHub
co-authored by Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Copilot Autofix powered by AI
parent 48792c7b7b
commit 0809c1888f
4 changed files with 12 additions and 10 deletions
@@ -355,8 +355,9 @@ public partial class WireMockServerTests
);
// Act
var content = new FormUrlEncodedContent([new KeyValuePair<string, string>("key1", "value1")]);
var response = await new HttpClient()
using var content = new FormUrlEncodedContent([new KeyValuePair<string, string>("key1", "value1")]);
using var httpClient = new HttpClient();
var response = await httpClient
.PostAsync($"{server.Url}/foo", content, _ct);
// Assert
@@ -374,15 +375,16 @@ public partial class WireMockServerTests
Request.Create()
.UsingPost()
.WithPath("/foo")
.WithBody((IDictionary<string, WireMockList<string>>? values) => values != null && values["key1"] == "value1")
.WithBody((IDictionary<string, WireMockList<string>>? values) => values != null && values.TryGetValue("key1", out var v) && v == "value1")
)
.RespondWith(
Response.Create()
);
// Act
var content = new FormUrlEncodedContent([new KeyValuePair<string, string>("key1", "value1")]);
var response = await new HttpClient()
using var content = new FormUrlEncodedContent([new KeyValuePair<string, string>("key1", "value1")]);
using var httpClient = new HttpClient();
var response = await httpClient
.PostAsync($"{server.Url}/foo", content, _ct);
// Assert