26 lines
654 B
PowerShell
26 lines
654 B
PowerShell
|
function Test-StringIsNullOrEmpty {
|
||
|
<#
|
||
|
.SYNOPSIS
|
||
|
A wrapper for IsNullorEmpty to assist with Pester tests.
|
||
|
|
||
|
.DESCRIPTION
|
||
|
Ingests a value to test if it is Null or Empty.
|
||
|
|
||
|
.PARAMETER Value
|
||
|
Value to insert into the IsNullOrEmpty command.
|
||
|
|
||
|
.EXAMPLE
|
||
|
Test-StringIsNullOrEmpty -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]::IsNullOrEmpty($Value))
|
||
|
}
|