mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-22 00:59:02 +01:00
up
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
</PropertyGroup>
|
||||
@@ -15,7 +15,7 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
|
||||
<PackageReference Include="WireMock.Net" Version="1.25.0" />
|
||||
<PackageReference Include="xunit.v3" Version="3.2.2" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
|
||||
|
||||
@@ -12,8 +12,10 @@ using WireMock.Server;
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace WireMock.Net.Tests;
|
||||
|
||||
public partial class WireMockServerTests
|
||||
public class WireMockServerTests
|
||||
{
|
||||
private readonly CancellationToken _ct = TestContext.Current.CancellationToken;
|
||||
|
||||
[Fact]
|
||||
public async Task WireMockServer_WithMultiPartBody_Using_MimePartMatchers()
|
||||
{
|
||||
@@ -85,19 +87,19 @@ public partial class WireMockServerTests
|
||||
var client = server.CreateClient();
|
||||
|
||||
// Act 1
|
||||
var response1 = await client.PostAsync("/multipart", formDataContent);
|
||||
var response1 = await client.PostAsync("/multipart", formDataContent, _ct);
|
||||
|
||||
// Assert 1
|
||||
response1.StatusCode.Should().Be(HttpStatusCode.OK);
|
||||
var content1 = await response1.Content.ReadAsStringAsync();
|
||||
var content1 = await response1.Content.ReadAsStringAsync(_ct);
|
||||
content1.Should().Be("POST;This is some plain text");
|
||||
|
||||
// Act 2
|
||||
var response2 = await client.PostAsync("/multipart2", formDataContent);
|
||||
var response2 = await client.PostAsync("/multipart2", formDataContent, _ct);
|
||||
|
||||
// Assert 1
|
||||
response2.StatusCode.Should().Be(HttpStatusCode.OK);
|
||||
var content2 = await response2.Content.ReadAsStringAsync();
|
||||
var content2 = await response2.Content.ReadAsStringAsync(_ct);
|
||||
content2.Should().Be("OK");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user