ps/Modules/Alkami.PowerShell.Common/Public/Test-StringIsNullOrEmpty.ps1

26 lines
654 B
PowerShell
Raw Normal View History

2023-05-30 22:51:22 -07:00
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))
}