ps/Modules/Alkami.DevOps.Validations/Public/Test-Passthrough.ps1
2023-05-30 22:51:22 -07:00

33 lines
811 B
PowerShell

function Test-Passthrough {
<#
.SYNOPSIS
Returns the first value in the arguments list
.DESCRIPTION
Mostly useful for forcing a test result to true or false
.PARAMETER result
Ignored entirely
.PARAMETER expect
Returned value
.PARAMETER message
Optional message to be returned
.EXAMPLE
$passedTest = (Test-Should -Result $webRequest -Predicate ${function:Test-Passthrough} $false "Test was invalid")
.NOTES
Returns the value of $expect
#>
[cmdletbinding()]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSReviewUnusedParameter", '', Justification="This is a test function; it's supposed to have an unused param", Scope = "Function")]
param(
$result,
$expect,
$message
)
$expect
$message
}