Functions/Assertions/BeLike.ps1

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

function PesterBeLike($value, $expectedMatch) {
    return ($value -like $expectedMatch)
}

function PesterBeLikeFailureMessage($value, $expectedMatch) {
    return "Expected: {$value} to be like the wildcard {$expectedMatch}"
}

function NotPesterBeLikeFailureMessage($value, $expectedMatch) {
    return "Expected: ${value} to not be like the wildcard ${expectedMatch}"
}