Functions/Assertions/Test-Assertion.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
function Test-PositiveAssertion($result) { if (-not $result) { throw "Expecting expression to pass, but it failed" } } function Test-NegativeAssertion($result) { if ($result) { throw "Expecting expression to pass, but it failed" } } |