Should
#
SYNOPSISShould is a keyword what is used to define an assertion inside It block.
#
SYNTAX#
Legacy (Default)#
Be#
BeExactly#
BeGreaterThan#
BeLessOrEqual#
BeIn#
BeLessThan#
BeGreaterOrEqual#
BeLike#
BeLikeExactly#
BeNullOrEmpty#
BeOfType#
BeTrue#
BeFalse#
Contain#
Exist#
FileContentMatch#
FileContentMatchExactly#
FileContentMatchMultiline#
HaveCount#
HaveParameter#
Match#
MatchExactly#
Throw#
DESCRIPTIONShould is a keyword what is used to define an assertion inside the It block. Should provides assertion methods for verify assertion e.g. comparing objects. If assertion is not met the test fails and an exception is throwed up.
Should can be used more than once in the It block if more than one assertion need to be verified. Each Should keywords need to be located in a new line. Test will be passed only when all assertion will be met (logical conjuction).
#
EXAMPLES#
Example 1{{ Add example description here }}
#
PARAMETERS#
-__LegacyArg1{{ Fill __LegacyArg1 Description }}
#
-__LegacyArg2{{ Fill __LegacyArg2 Description }}
#
-__LegacyArg3{{ Fill __LegacyArg3 Description }}
#
-ActualValue{{ Fill ActualValue Description }}
#
-Be{{ Fill Be Description }}
#
-Because{{ Fill Because Description }}
#
-BeExactly{{ Fill BeExactly Description }}
#
-BeFalse{{ Fill BeFalse Description }}
#
-BeGreaterOrEqual{{ Fill BeGreaterOrEqual Description }}
#
-BeGreaterThan{{ Fill BeGreaterThan Description }}
#
-BeIn{{ Fill BeIn Description }}
#
-BeLessOrEqual{{ Fill BeLessOrEqual Description }}
#
-BeLessThan{{ Fill BeLessThan Description }}
#
-BeLike{{ Fill BeLike Description }}
#
-BeLikeExactly{{ Fill BeLikeExactly Description }}
#
-BeNullOrEmpty{{ Fill BeNullOrEmpty Description }}
#
-BeOfType{{ Fill BeOfType Description }}
#
-BeTrue{{ Fill BeTrue Description }}
#
-Contain{{ Fill Contain Description }}
#
-DefaultValue{{ Fill DefaultValue Description }}
#
-ErrorId{{ Fill ErrorId Description }}
#
-ExceptionType{{ Fill ExceptionType Description }}
#
-Exist{{ Fill Exist Description }}
#
-ExpectedContent{{ Fill ExpectedContent Description }}
#
-ExpectedMessage{{ Fill ExpectedMessage Description }}
#
-ExpectedType{{ Fill ExpectedType Description }}
#
-ExpectedValue{{ Fill ExpectedValue Description }}
#
-FileContentMatch{{ Fill FileContentMatch Description }}
#
-FileContentMatchExactly{{ Fill FileContentMatchExactly Description }}
#
-FileContentMatchMultiline{{ Fill FileContentMatchMultiline Description }}
#
-HasArgumentCompleter{{ Fill HasArgumentCompleter Description }}
#
-HaveCount{{ Fill HaveCount Description }}
#
-HaveParameter{{ Fill HaveParameter Description }}
#
-Mandatory{{ Fill Mandatory Description }}
#
-Match{{ Fill Match Description }}
#
-MatchExactly{{ Fill MatchExactly Description }}
#
-Not{{ Fill Not Description }}
#
-ParameterName{{ Fill ParameterName Description }}
#
-PassThru{{ Fill PassThru Description }}
#
-RegularExpression{{ Fill RegularExpression Description }}
#
-Throw{{ Fill Throw Description }}
#
-Type{{ Fill Type Description }}
#
CommonParametersThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
#
INPUTS#
OUTPUTS#
NOTES#
RELATED LINKS#
EDIT THIS PAGEThis page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the pester/Pester repository. See our contribution guide for more information.