Parameter Count Test

This commit is contained in:
Wes Carroll
2019-07-21 11:49:08 -04:00
parent 5213614299
commit 6df14f7a8d
@@ -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 11 parameters defined" {
(get-command $global:function).Parameters.Count | Should -Be 14
}
It "Has a mandatory string array parameter for the settings file to import" {
Get-Command $global:function | Should -HaveParameter InputFile
Get-Command $global:function | Should -HaveParameter InputFile -Mandatory