mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-27 20:01:52 +01:00
xunit v3
This commit is contained in:
@@ -18,11 +18,11 @@ public class IntegrationTests
|
||||
using var client = factory.CreateClient();
|
||||
|
||||
// Act
|
||||
var response = await client.GetAsync(requestUri);
|
||||
var response = await client.GetAsync(requestUri, TestContext.Current.CancellationToken);
|
||||
|
||||
// Assert
|
||||
response.EnsureSuccessStatusCode();
|
||||
var stringResponse = await response.Content.ReadAsStringAsync();
|
||||
var stringResponse = await response.Content.ReadAsStringAsync(TestContext.Current.CancellationToken);
|
||||
stringResponse.Should().Be(expectedResponse);
|
||||
}
|
||||
|
||||
@@ -40,11 +40,11 @@ public class IntegrationTests
|
||||
request.Headers.Add("X-WireMock-Response-Delay", "10");
|
||||
|
||||
// Act
|
||||
var response = await client.SendAsync(request);
|
||||
var response = await client.SendAsync(request, TestContext.Current.CancellationToken);
|
||||
|
||||
// Assert
|
||||
response.EnsureSuccessStatusCode();
|
||||
var stringResponse = await response.Content.ReadAsStringAsync();
|
||||
var stringResponse = await response.Content.ReadAsStringAsync(TestContext.Current.CancellationToken);
|
||||
stringResponse.Should().Be(expectedResponse);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsPackable>false</IsPackable>
|
||||
@@ -25,7 +26,7 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
|
||||
<PackageReference Include="Moq" Version="4.20.72" />
|
||||
<PackageReference Include="xunit" Version="2.9.3" />
|
||||
<PackageReference Include="xunit.v3" Version="3.2.2" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
||||
Reference in New Issue
Block a user