Functions/Assertions/MatchExactly.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14

function PesterMatchExactly($value, $expectedMatch) {
    return ($value -cmatch $expectedMatch)
}

function PesterMatchExactlyFailureMessage($value, $expectedMatch) {
    return "Expected: {$value} to exactly match the expression {$expectedMatch}"
}

function NotPesterMatchExactlyFailureMessage($value, $expectedMatch) {
    return "Expected: ${value} to not match the expression ${expectedMatch} exactly"
}