Skip to content

Commit d38b1a3

Browse files
vzarytovskiibaronfel
authored andcommitted
[WIP] Moving to xUnit
1 parent eb0fb19 commit d38b1a3

File tree

8 files changed

+16
-7
lines changed

8 files changed

+16
-7
lines changed

eng/Versions.props

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
<MicrosoftNetCompilersVersion>2.7.0</MicrosoftNetCompilersVersion>
177177
<MicrosoftNETCoreILDAsmVersion>3.0.0-preview-27318-01</MicrosoftNETCoreILDAsmVersion>
178178
<MicrosoftNETCoreILAsmVersion>3.0.0-preview-27318-01</MicrosoftNETCoreILAsmVersion>
179-
<MicrosoftNETTestSdkVersion>15.8.0</MicrosoftNETTestSdkVersion>
179+
<MicrosoftNETTestSdkVersion>16.6.1</MicrosoftNETTestSdkVersion>
180180
<MicrosoftWin32RegistryVersion>4.3.0</MicrosoftWin32RegistryVersion>
181181
<NewtonsoftJsonVersion>9.0.1</NewtonsoftJsonVersion>
182182
<NUnitVersion>3.11.0</NUnitVersion>
@@ -186,5 +186,7 @@
186186
<RoslynToolsSignToolVersion>1.0.0-beta2-dev3</RoslynToolsSignToolVersion>
187187
<StrawberryPerlVersion>5.28.0.1</StrawberryPerlVersion>
188188
<StreamJsonRpcVersion>2.0.187</StreamJsonRpcVersion>
189+
<XUnitVersion>2.4.1</XUnitVersion>
190+
<FluentAssertionsVersion>2.4.1</FluentAssertionsVersion>
189191
</PropertyGroup>
190192
</Project>

tests/Directory.Build.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,11 @@
88
<PackageReference Include="NUnit3TestAdapter" Version="$(NUnit3TestAdapterVersion)" />
99
<PackageReference Include="NunitXml.TestLogger" Version="$(NunitXmlTestLoggerVersion)" />
1010
</ItemGroup>
11+
<ItemGroup Condition="'$(UnitTestType)' == 'xunit'">
12+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkVersion)" />
13+
<PackageReference Include="xunit" Version="$(XUnitVersion)" />
14+
<PackageReference Include="xunit.runner.visualstudio" Version="$(XUnitVersion)" />
15+
<PackageReference Include="NunitXml.TestLogger" Version="$(NunitXmlTestLoggerVersion)" />
16+
</ItemGroup>
1117

1218
</Project>

tests/FSharp.TestHelpers/CompilerAssert.fs renamed to tests/FSharp.Test.Utilities/CompilerAssert.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
22

3-
namespace FSharp.TestHelpers
3+
namespace FSharp.Test.Utilities
44

55
open System
66
open System.Diagnostics
@@ -19,7 +19,7 @@ open NUnit.Framework
1919
open System.Reflection.Emit
2020
open Microsoft.CodeAnalysis
2121
open Microsoft.CodeAnalysis.CSharp
22-
open FSharp.TestHelpers.Utilities
22+
open FSharp.Test.Utilities.Utilities
2323

2424
[<Sealed>]
2525
type ILVerifier (dllFilePath: string) =
File renamed without changes.

tests/FSharp.TestHelpers/FSharp.TestHelpers.fsproj renamed to tests/FSharp.Test.Utilities/FSharp.TestHelpers.fsproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="$(MicrosoftCodeAnalysisWorkspacesCommonVersion)" />
4040
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(MicrosoftCodeAnalysisCSharpVersion)" />
4141
<PackageReference Include="Microsoft.CodeAnalysis.Test.Resources.Proprietary" Version="$(MicrosoftCodeAnalysisTestResourcesProprietaryVersion)" />
42-
<PackageReference Include="NUnit" Version="$(NUnitVersion)" />
42+
<PackageReference Include="NUnit" Version="$(NUnitVersion)" /> <!-- TODO: This should be removed once all NUnit frameworks are migrated to xUnit -->
43+
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
4344
</ItemGroup>
4445
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
22

3-
namespace FSharp.TestHelpers
3+
namespace FSharp.Test.Utilities
44

55
open System
66
open System.IO
File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
22

3-
namespace FSharp.TestHelpers
3+
namespace FSharp.Test.Utilities
44

55
open System
66
open System.IO
77
open System.Collections.Immutable
88
open Microsoft.CodeAnalysis
99
open Microsoft.CodeAnalysis.CSharp
1010
open System.Diagnostics
11-
open FSharp.TestHelpers
11+
open FSharp.Test.Utilities
1212

1313
// This file mimics how Roslyn handles their compilation references for compilation testing
1414

0 commit comments

Comments
 (0)