Skip to content

Commit 47341f8

Browse files
committed
Update to xunit.v3
1 parent 34576ef commit 47341f8

File tree

6 files changed

+19
-14
lines changed

6 files changed

+19
-14
lines changed

global.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"sdk": {
3+
"version": "10.0.100-rc.2.25468.104"
4+
},
5+
"test": {
6+
"runner": "Microsoft.Testing.Platform"
7+
}
8+
}

tests/Tests.AzureAppConfiguration.AspNetCore/Tests.AzureAppConfiguration.AspNetCore.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
<SignAssembly>true</SignAssembly>
88
<AssemblyOriginatorKeyFile>..\..\build\AzureAppConfiguration.snk</AssemblyOriginatorKeyFile>
99
<IsPackable>false</IsPackable>
10+
<OutputType>Exe</OutputType>
1011
</PropertyGroup>
1112

1213
<ItemGroup>
1314
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
1415
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
1516
<PackageReference Include="Moq" Version="4.20.70" />
16-
<PackageReference Include="xunit" Version="2.7.0" />
17-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
17+
<PackageReference Include="xunit.v3" Version="3.1.0" />
18+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
1819
<PrivateAssets>all</PrivateAssets>
1920
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2021
</PackageReference>
21-
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
2222
</ItemGroup>
2323

2424
<ItemGroup>

tests/Tests.AzureAppConfiguration.Functions.Worker/Tests.AzureAppConfiguration.Functions.Worker.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
<SignAssembly>true</SignAssembly>
88
<AssemblyOriginatorKeyFile>..\..\build\AzureAppConfiguration.snk</AssemblyOriginatorKeyFile>
99
<IsPackable>false</IsPackable>
10+
<OutputType>Exe</OutputType>
1011
</PropertyGroup>
1112

1213
<ItemGroup>
1314
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
1415
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
1516
<PackageReference Include="Moq" Version="4.20.70" />
16-
<PackageReference Include="xunit" Version="2.7.0" />
17-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
17+
<PackageReference Include="xunit.v3" Version="3.1.0" />
18+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
1819
<PrivateAssets>all</PrivateAssets>
1920
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2021
</PackageReference>
21-
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
2222
</ItemGroup>
2323

2424
<ItemGroup>

tests/Tests.AzureAppConfiguration/Integration/IntegrationTests.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929

3030
namespace Tests.AzureAppConfiguration
3131
{
32-
using Xunit.Abstractions;
33-
3432
/// <summary>
3533
/// Integration tests for Azure App Configuration that connect to a real service.
3634
/// Uses an existing App Configuration store and Key Vault for testing.
@@ -135,7 +133,7 @@ private async Task<string> CreateSnapshot(string snapshotName, IEnumerable<Confi
135133
return operation.Value.Name;
136134
}
137135

138-
public async Task InitializeAsync()
136+
public async ValueTask InitializeAsync()
139137
{
140138
DefaultAzureCredential credential = _defaultAzureCredential;
141139
string subscriptionId = GetCurrentSubscriptionId();
@@ -268,7 +266,7 @@ private async Task CleanupStaleResources()
268266
}
269267
}
270268

271-
public async Task DisposeAsync()
269+
public async ValueTask DisposeAsync()
272270
{
273271
await CleanupStaleResources();
274272
}

tests/Tests.AzureAppConfiguration/Tests.AzureAppConfiguration.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<AssemblyOriginatorKeyFile>..\..\build\AzureAppConfiguration.snk</AssemblyOriginatorKeyFile>
99
<IsPackable>false</IsPackable>
1010
<JsonSerializerIsReflectionEnabledByDefault>true</JsonSerializerIsReflectionEnabledByDefault>
11+
<OutputType>Exe</OutputType>
1112
</PropertyGroup>
1213

1314
<ItemGroup>
@@ -21,12 +22,11 @@
2122
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
2223
<PackageReference Include="System.Linq.Async" Version="6.0.3" />
2324
<PackageReference Include="Moq" Version="4.20.70" />
24-
<PackageReference Include="xunit" Version="2.7.0" />
25-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
25+
<PackageReference Include="xunit.v3" Version="3.1.0" />
26+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
2627
<PrivateAssets>all</PrivateAssets>
2728
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2829
</PackageReference>
29-
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
3030
</ItemGroup>
3131

3232
<ItemGroup>

tests/Tests.AzureAppConfiguration/Unit/SnapshotReferenceTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
using System.Threading;
1414
using System.Threading.Tasks;
1515
using Xunit;
16-
using Xunit.Abstractions;
1716

1817
namespace Tests.AzureAppConfiguration
1918
{

0 commit comments

Comments
 (0)