Update Tests to include set counts
This commit is contained in:
@@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[
|
|||||||
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
|
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
|
||||||
|
|
||||||
Context "$global:function::Parameter Unit Tests" {
|
Context "$global:function::Parameter Unit Tests" {
|
||||||
it "$global:function should have exactly 16 parameters defined" {
|
It "$global:function should have exactly 16 parameters defined" {
|
||||||
(get-command $global:function).Parameters.Count | Should -Be 16
|
(Get-Command $global:function).Parameters.Count | Should -Be 16
|
||||||
}
|
}
|
||||||
|
|
||||||
$ParameterTestCases = @(
|
$ParameterTestCases = @(
|
||||||
@@ -41,6 +41,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' {
|
|||||||
foreach ($Set in $ParameterSet) {
|
foreach ($Set in $ParameterSet) {
|
||||||
$commandParameterSets.ContainsKey($Set) | Should -BeTrue
|
$commandParameterSets.ContainsKey($Set) | Should -BeTrue
|
||||||
}
|
}
|
||||||
|
$commandParameterSets.Count | Should -Be $ParameterSet.Count
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user