Functions/Assertions/BeGreaterThan.Tests.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Set-StrictMode -Version Latest

InModuleScope Pester {
    Describe "PesterBeGreaterThan" {
        It "passes if value greater than expected" {
            2 | Should BeGreaterThan 1
            2 | Should -BeGreaterThan 1
            2 | Should -GT 1
        }

        It "fails if values equal" {
            3 | Should Not BeGreaterThan 3
            3 | Should -Not -BeGreaterThan 3
            3 | Should -Not -GT 3
        }

        It "fails if value less than expected" {
            4 | Should Not BeGreaterThan 5
            4 | Should -Not -BeGreaterThan 5
            4 | Should -Not -GT 5
        }
    }

}