-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTest.ps1
39 lines (28 loc) · 785 Bytes
/
Test.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
[CmdletBinding(PositionalBinding = $false)]
param(
[ValidateSet('Debug', 'Release')]
$Configuration = 'Debug',
[switch]
$CollectCoverage,
[switch]
$NoBuild,
[switch]
$NoIntegrationTests
)
Set-StrictMode -Version 1
$ErrorActionPreference = 'Stop'
. .\Functions.ps1
$arguments = New-Object System.Collections.ArrayList
if ($NoBuild) {
[void]$arguments.Add('--no-build')
}
if($NoIntegrationTests) {
[void]$arguments.Add('--filter="Category!=Integration"')
}
[void]$arguments.Add("-p:Configuration=$Configuration")
if ($CollectCoverage) {
[void]$arguments.Add("-p:CollectCoverage=true")
}
exec dotnet test "$PSScriptRoot\test\CodeTherapy.HttpSecurityCheck.Tests\CodeTherapy.HttpSecurityCheck.Tests.csproj" `
@arguments
write-host -f green 'Test Done!'