26 lines
679 B
PowerShell
26 lines
679 B
PowerShell
function Test-StringIsNullOrWhitespace {
|
|
<#
|
|
.SYNOPSIS
|
|
A wrapper for IsNullOrWhitespace to assist with Pester tests.
|
|
|
|
.DESCRIPTION
|
|
Ingests a value to test if it is Null or Empty.
|
|
|
|
.PARAMETER Value
|
|
Value to insert into the IsNullOrWhitespace command.
|
|
|
|
.EXAMPLE
|
|
Test-StringIsNullOrWhitespace -Value "Test"
|
|
|
|
False
|
|
#>
|
|
[CmdletBinding()]
|
|
[OutputType([bool])]
|
|
param(
|
|
[Parameter(Mandatory = $false)]
|
|
[string]$Value
|
|
)
|
|
|
|
# This function is just a convenience wrapper to allow us to mock them in Pester tests
|
|
return ([string]::IsNullOrWhitespace($Value))
|
|
} |