forked from pester/Pester
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d41fb17
commit 2c9366f
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Set-StrictMode -Version Latest | ||
|
||
InModuleScope Pester { | ||
Describe "PesterBeGreaterThan" { | ||
It "passes if value greater than expected" { | ||
Test-PositiveAssertion (PesterBeGreaterThan 2 1) | ||
2 | Should BeGreaterThan 1 | ||
} | ||
It "fails if values equal" { | ||
Test-NegativeAssertion (PesterBeGreaterThan 3 3) | ||
} | ||
|
||
It "fails if value less than expected" { | ||
Test-NegativeAssertion (PesterBeGreaterThan 4 5) | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
function PesterBeGreaterThan($value, $expected) | ||
{ | ||
return( $value -gt $expected ) | ||
} | ||
|
||
function PesterBeGreaterThanFailureMessage($value,$expected) | ||
{ | ||
"Expected {0} to be greater than {1}" -f $value,$expected | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters