. $PSScriptRoot\..\..\Load-PesterModules.ps1 $here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.tests\.', '.' $functionPath = Join-Path -Path $here -ChildPath $sut Write-Host "Overriding SUT: $functionPath" Import-Module $functionPath -Force $moduleForMock = "" Describe "Select-AlkamiAppServers" { Context "Server Filter" { $servers = @("APP1", "APP2", "ALK-PLA1-QA4", "BadAPP123", "MIC1", "FAB1", "WEB1", "ALK-PLA1-QW4") It "Filters App Servers" { $filtered = Select-AlkamiAppServers -Servers $servers $filtered | Should -Be @("APP1", "APP2", "ALK-PLA1-QA4") } It "Handles Empty Collection" { $result = Select-AlkamiAppServers -Servers @() $result | Should -Be $null } It "Handles Null" { $result = Select-AlkamiAppServers -Servers $null $result | Should -Be $null } } }