mirror of
https://github.com/freedbygrace/PSOPNSenseAPI.git
synced 2026-08-06 08:58:17 +00:00
Add port forwarding support, improve XML documentation, and add unit tests
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
[CmdletBinding()]
|
||||
param (
|
||||
[Parameter()]
|
||||
[string]
|
||||
$Configuration = "Debug"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
# Define paths
|
||||
$rootDir = Split-Path -Parent $PSScriptRoot
|
||||
$srcDir = Join-Path -Path $rootDir -ChildPath "src"
|
||||
$testDir = Join-Path -Path $srcDir -ChildPath "PSOPNSenseAPI.Tests"
|
||||
|
||||
# Run the tests
|
||||
Write-Verbose "Running tests in $Configuration configuration"
|
||||
dotnet test "$testDir" -c $Configuration
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Tests failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
Write-Output "Tests completed successfully!"
|
||||
Reference in New Issue
Block a user