Add Parameter count test

This commit is contained in:
Wes Carroll
2019-07-21 11:36:46 -04:00
parent a39f2638d1
commit 5213614299
3 changed files with 17 additions and 1 deletions
+4
View File
@@ -5,6 +5,10 @@ $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 22 parameters defined" {
(get-command $global:function).Parameters.Count | Should -Be 22
}
$ParameterTestCases = @(
@{ParameterName = 'hostName'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'datastoreName'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }