functions/helpers/Find-OpenPort.Tests.ps1
$filename = $($(Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.ps1","")) Describe "$filename Unit Tests" -Tags 'Unit' { It "TestMethod" { } } Describe "$filename Integration Tests" -Tags 'Integration' { It "Can Find Port" { [int[]] $myPortArray = 8001, 8002, 8003, 8004, 8005, 8006, 8007, 8008, 8009, 8010, 8011, 8012, 8013, 8014, 8015, 8016, 8017, 8018, 8019, 8020, 8021, 8022, 8023, 8024, 8025, 8026, 8027, 8028, 8029, 8030, 8031, 8032, 8033, 8034, 8035, 8036, 8037, 8038, 8039 [int] $port = $(Find-OpenPort -portArray $myPortArray -Verbose).Port $port | Should BeGreaterThan 0 } } |