Add Parameter Tests

This commit is contained in:
Wes Carroll
2019-07-21 20:57:25 -04:00
parent d2eddea4bc
commit 6a924067c9
+7
View File
@@ -5,7 +5,14 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
it "$global:function should have exactly 12 parameters defined" {
(get-command $global:function).Parameters.Count | Should -Be 12
}
it "$global:function has a non-mandatory string parameter for the zOrgIdentifier" {
Get-Command $global:function | Should -HaveParameter zOrgIdentifier -Type String
Get-Command $global:function | Should -HaveParameter zOrgIdentifier -not -Mandatory
}
}
Context "$global:function::Parameter Functional Tests" {