Update Parameter Tests

This commit is contained in:
Wes Carroll
2019-05-19 16:24:39 -05:00
parent f2ab959b93
commit 98aedca373
2 changed files with 18 additions and 0 deletions
@@ -16,4 +16,13 @@ Describe $file.BaseName -Tag 'Unit' {
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
Context "$($file.BaseName)::Parameter Unit Tests" {
it "has a mandatory string parameter for the vpgName" {
Get-Command $file.BaseName | Should -HaveParameter vpgName
Get-Command $file.BaseName | Should -HaveParameter vpgName -Type string[]
Get-Command $file.BaseName | Should -HaveParameter vpgName -Mandatory
}
}
}
@@ -16,4 +16,13 @@ Describe $file.BaseName -Tag 'Unit' {
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
Context "$($file.BaseName)::Parameter Unit Tests" {
it "has a mandatory string parameter for the vpgName" {
Get-Command $file.BaseName | Should -HaveParameter vpgName
Get-Command $file.BaseName | Should -HaveParameter vpgName -Type string[]
Get-Command $file.BaseName | Should -HaveParameter vpgName -Mandatory
}
}
}