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 12 parameters defined" {
(get-command $global:function).Parameters.Count | Should -Be 12
}
It "Has a mandatory string array parameter for the settings file to import" {
Get-Command $global:function | Should -HaveParameter settingsFile
Get-Command $global:function | Should -HaveParameter settingsFile -Mandatory