File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,23 @@ Describe 'Get-SqlDscRSPackage' -Tag 'Public' {
161161 }
162162
163163 Context ' Parameter validation' {
164+ It ' Should have the correct parameters in parameter set __AllParameterSets' - ForEach @ (
165+ @ {
166+ ExpectedParameterSetName = ' __AllParameterSets'
167+ ExpectedParameters = ' [-FilePath] <String> [-Force] [<CommonParameters>]'
168+ }
169+ ) {
170+ $result = (Get-Command - Name ' Get-SqlDscRSPackage' ).ParameterSets |
171+ Where-Object - FilterScript { $_.Name -eq $ExpectedParameterSetName } |
172+ Select-Object - Property @ (
173+ @ { Name = ' ParameterSetName' ; Expression = { $_.Name } },
174+ @ { Name = ' ParameterListAsString' ; Expression = { $_.ToString () } }
175+ )
176+
177+ $result.ParameterSetName | Should - Be $ExpectedParameterSetName
178+ $result.ParameterListAsString | Should - Be $ExpectedParameters
179+ }
180+
164181 It ' Should have the correct parameters' {
165182 $commandInfo = Get-Command - Name ' Get-SqlDscRSPackage'
166183
You can’t perform that action at this time.
0 commit comments