Skip to content

Commit 4570379

Browse files
committed
Use NUnit.ConsoleRunner.NetCore to run tests
1 parent 41ee214 commit 4570379

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

.config/dotnet-tools.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,22 @@
66
"version": "8.9.3",
77
"commands": [
88
"altcover"
9-
]
9+
],
10+
"rollForward": false
1011
},
1112
"coveralls.net": {
1213
"version": "4.0.1",
1314
"commands": [
1415
"csmacnz.Coveralls"
15-
]
16+
],
17+
"rollForward": false
18+
},
19+
"nunit.consolerunner.netcore": {
20+
"version": "3.18.3",
21+
"commands": [
22+
"nunit"
23+
],
24+
"rollForward": false
1625
}
1726
}
1827
}

scripts/test.ps1

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ Write-Output ""
1313

1414
[xml]$project = Get-Content UnitTests\UnitTests.csproj
1515

16-
$nugetPackagesDir = Join-Path $Home ".nuget" "packages"
17-
18-
# Get the NUnit.ConsoleRunner executable path
19-
$packageReference = $project.SelectSingleNode("/Project/ItemGroup/PackageReference[@Include='NUnit.ConsoleRunner']")
20-
$consoleRunnerVersion = $packageReference.GetAttribute("Version")
21-
22-
$NUnitConsoleRunner = Join-Path $nugetPackagesDir "nunit.consolerunner" $consoleRunnerVersion "tools" "nunit3-console.exe"
23-
2416
# Get the OutputPath
2517
$targetFramework = $project.SelectSingleNode("/Project/PropertyGroup/TargetFramework")
2618
$OutputDir = Join-Path "UnitTests" "bin" $Configuration $targetFramework.InnerText
@@ -35,4 +27,4 @@ if ($GenerateCodeCoverage -eq 'true') {
3527

3628
Write-Output "Running the UnitTests"
3729

38-
& $NUnitConsoleRunner --domain:single $UnitTestsAssembly
30+
dotnet nunit --domain:single $UnitTestsAssembly

0 commit comments

Comments
 (0)