Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSOE-935: Upgrade to xUnit 3 #48

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
11 changes: 11 additions & 0 deletions CompatibilitySuppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:Xunit.Abstractions.TestOutputHelperExtensions</Target>
<Left>lib/net8.0/Lombiq.Tests.dll</Left>
<Right>lib/net8.0/Lombiq.Tests.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
</Suppressions>
2 changes: 1 addition & 1 deletion Extensions/TestOutputHelperExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Lombiq.Tests.Helpers;

namespace Xunit.Abstractions;
namespace Xunit;

public static class TestOutputHelperExtensions
{
Expand Down
8 changes: 8 additions & 0 deletions Integration/Services/TestReverseProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ await httpForwarder.SendAsync(

_webHost = webHostBuilder.Build();

// This object is managed directly via its public methods and it should be only explicitly shut down and
// disposed by them.
#pragma warning disable MA0040 // Use an overload with a CancellationToken
return _webHost.StartAsync();
#pragma warning restore MA0040 // Use an overload with a CancellationToken
}

public Task StopAsync()
Expand All @@ -74,7 +78,11 @@ public Task StopAsync()

private async Task StopInternalAsync()
{
// This object is managed directly via its public methods and it should be only explicitly shut down and
// disposed by them.
#pragma warning disable MA0040 // Use an overload with a CancellationToken
await _webHost.StopAsync();
#pragma warning restore MA0040 // Use an overload with a CancellationToken
_webHost.Dispose();
_webHost = null;
}
Expand Down
2 changes: 1 addition & 1 deletion Lombiq.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.12" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="Shouldly" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.v3.extensibility.core" Version="1.0.1" />
<PackageReference Include="Moq.AutoMock" Version="3.5.0" />
<PackageReference Include="Yarp.ReverseProxy" Version="2.2.0" />
</ItemGroup>
Expand Down
Loading