mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-02-23 01:04:55 +01:00
ct
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using AwesomeAssertions;
|
||||
@@ -9,6 +10,8 @@ namespace WireMock.Net.Tests.Http;
|
||||
|
||||
public class ByteArrayContentHelperTests
|
||||
{
|
||||
private readonly CancellationToken _ct = TestContext.Current.CancellationToken;
|
||||
|
||||
[Fact]
|
||||
public async Task ByteArrayContentHelperTests_Create_WithNullContentType()
|
||||
{
|
||||
@@ -20,7 +23,7 @@ public class ByteArrayContentHelperTests
|
||||
|
||||
// Assert
|
||||
result.Headers.ContentType.Should().BeNull();
|
||||
(await result.ReadAsByteArrayAsync()).Should().BeEquivalentTo(content);
|
||||
(await result.ReadAsByteArrayAsync(_ct)).Should().BeEquivalentTo(content);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -37,7 +40,7 @@ public class ByteArrayContentHelperTests
|
||||
var result = ByteArrayContentHelper.Create(content, contentType);
|
||||
|
||||
// Assert
|
||||
result.Headers.ContentType.ToString().Should().Be(expected);
|
||||
(await result.ReadAsByteArrayAsync()).Should().BeEquivalentTo(content);
|
||||
result.Headers.ContentType?.ToString().Should().Be(expected);
|
||||
(await result.ReadAsByteArrayAsync(_ct)).Should().BeEquivalentTo(content);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user