This commit is contained in:
Stef Heyenrath
2026-02-21 17:21:18 +01:00
parent 43a26ec4bc
commit 43be85a88a
27 changed files with 306 additions and 281 deletions

View File

@@ -22,6 +22,8 @@ namespace WireMock.Net.Tests.ResponseBuilders;
public sealed class ResponseWithProxyIntegrationTests(ITestOutputHelper output)
{
private readonly CancellationToken _ct = TestContext.Current.CancellationToken;
[Fact]
public async Task Response_UsingTextPlain()
{
@@ -44,12 +46,12 @@ public sealed class ResponseWithProxyIntegrationTests(ITestOutputHelper output)
content.Headers.ContentType = new MediaTypeHeaderValue("text/plain");
// When
var response = await client.PatchAsync("/zipcode", content);
var response = await client.PatchAsync("/zipcode", content, _ct);
// Then
response.StatusCode.Should().Be(HttpStatusCode.OK);
response.Content.Headers.GetValues("Content-Type").Should().BeEquivalentTo("text/plain; charset=utf-8");
var result = await response.Content.ReadAsStringAsync();
var result = await response.Content.ReadAsStringAsync(_ct);
result.Should().Be("0123");
}