Skip to content

Commit 472378b

Browse files
authored
Migrate to xunit.v3 (OrchardCMS#17250)
1 parent b25a311 commit 472378b

17 files changed

+67
-50
lines changed

Directory.Packages.props

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
66
</PropertyGroup>
77

8-
<PropertyGroup>
9-
<!-- Special case - this property is used by a DotNetCliToolReference -->
10-
<DotNetXunitVersion>2.3.0</DotNetXunitVersion>
11-
</PropertyGroup>
12-
138
<ItemGroup>
149
<PackageVersion Include="AngleSharp" Version="1.2.0" />
1510
<PackageVersion Include="AWSSDK.S3" Version="3.7.411.5" />
@@ -70,9 +65,9 @@
7065
<PackageVersion Include="StyleCop.Analyzers" Version="1.1.118" />
7166
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
7267
<PackageVersion Include="System.IO.Hashing" Version="8.0.0" />
73-
<PackageVersion Include="xunit" Version="2.9.2" />
74-
<PackageVersion Include="xunit.analyzers" Version="1.17.0" />
75-
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
68+
<PackageVersion Include="xunit.v3" Version="1.0.0" />
69+
<PackageVersion Include="xunit.analyzers" Version="1.18.0" />
70+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.0" />
7671
<PackageVersion Include="YesSql" Version="5.2.0" />
7772
<PackageVersion Include="YesSql.Abstractions" Version="5.2.0" />
7873
<PackageVersion Include="YesSql.Core" Version="5.2.0" />

test/OrchardCore.Abstractions.Tests/Modules/Manifest/FeatureAttributeTests.Attribute.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System.Linq;
55
using System.Reflection;
66
using Xunit;
7-
using Xunit.Abstractions;
87

98
namespace OrchardCore.Modules.Manifest;
109

test/OrchardCore.Abstractions.Tests/Modules/Manifest/FeatureAttributeTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Linq;
33
using Xunit;
4-
using Xunit.Abstractions;
54

65
namespace OrchardCore.Modules.Manifest;
76

test/OrchardCore.Abstractions.Tests/Modules/Manifest/ModuleAttributeTests.Attribute.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Reflection;
33
using Xunit;
4-
using Xunit.Abstractions;
54

65
namespace OrchardCore.Modules.Manifest;
76

test/OrchardCore.Abstractions.Tests/Modules/Manifest/ModuleAttributeTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Linq;
33
using OrchardCore.DisplayManagement.Manifest;
44
using Xunit;
5-
using Xunit.Abstractions;
65

76
namespace OrchardCore.Modules.Manifest;
87

test/OrchardCore.Abstractions.Tests/Modules/Manifest/ModuleMarkerAttributeTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//namespace OrchardCore.Modules.Manifest
77
//{
88
// using Xunit;
9-
// using Xunit.Abstractions;
109

1110
// /// <inheritdoc/>
1211
// public class ModuleMarkerAttributeTests : ModuleAttributeTests<ModuleMarkerAttribute>

test/OrchardCore.Abstractions.Tests/Modules/Manifest/ThemeAttributeTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System.Linq;
55
using OrchardCore.Modules.Manifest;
66
using Xunit;
7-
using Xunit.Abstractions;
87

98
namespace OrchardCore.DisplayManagement.Manifest;
109
/// <inheritdoc/>

test/OrchardCore.Abstractions.Tests/OrchardCore.Abstractions.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<TargetFrameworks>$(CommonTargetFrameworks)</TargetFrameworks>
55
<RootNamespace>OrchardCore</RootNamespace>
6+
<OutputType>Exe</OutputType>
67
<!-- Remove the underscores from member name -->
78
<NoWarn>$(NoWarn);CA1707;EnableGenerateDocumentationFile</NoWarn>
89
</PropertyGroup>
@@ -18,10 +19,9 @@
1819
<PackageReference Include="Microsoft.NET.Test.Sdk" />
1920
<PackageReference Include="System.Linq.Async" />
2021
<PackageReference Include="Moq" />
21-
<PackageReference Include="xunit" />
22+
<PackageReference Include="xunit.v3" />
2223
<PackageReference Include="xunit.analyzers" />
2324
<PackageReference Include="xunit.runner.visualstudio" />
24-
<DotNetCliToolReference Include="dotnet-xunit" Version="$(DotNetXunitVersion)" />
2525
</ItemGroup>
2626

2727
<ItemGroup>

test/OrchardCore.Benchmarks/OrchardCore.Benchmarks.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<TargetFrameworks>$(CommonTargetFrameworks)</TargetFrameworks>
55
<RootNamespace>OrchardCore.Benchmark</RootNamespace>
66
<IsPackable>false</IsPackable>
7+
<GenerateTestingPlatformEntryPoint>false</GenerateTestingPlatformEntryPoint>
8+
<IsTestProject>false</IsTestProject>
9+
<TestProject>false</TestProject>
710
<OutputType>Exe</OutputType>
811
<!-- Remove the underscores from member name -->
912
<NoWarn>$(NoWarn);CA1707;EnableGenerateDocumentationFile</NoWarn>

test/OrchardCore.Tests/Apis/GraphQL/Blog/BlogPostTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public async Task ShouldNotBeAbleToExecuteAnyQueriesWithoutPermission()
207207

208208
await context.InitializeAsync();
209209

210-
var response = await context.GraphQLClient.Client.GetAsync("api/graphql");
210+
var response = await context.GraphQLClient.Client.GetAsync("api/graphql", TestContext.Current.CancellationToken);
211211
Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode);
212212
}
213213

0 commit comments

Comments
 (0)