|
1 |
| -#Requires -Module @{ ModuleName="Pester"; ModuleVersion="5.0"} |
2 |
| -param( |
3 |
| - $ModuleName = "FabricTools", |
4 |
| - $expectedParams = @( |
5 |
| - "statusCode" |
6 |
| - "response" |
7 |
| - "responseHeader" |
8 |
| - "Name" |
9 |
| - "typeName" |
10 |
| - "Verbose" |
11 |
| - "Debug" |
12 |
| - "ErrorAction" |
13 |
| - "WarningAction" |
14 |
| - "InformationAction" |
15 |
| - "ProgressAction" |
16 |
| - "ErrorVariable" |
17 |
| - "WarningVariable" |
18 |
| - "InformationVariable" |
19 |
| - "OutVariable" |
20 |
| - "OutBuffer" |
21 |
| - "PipelineVariable" |
22 |
| - |
23 |
| - ) |
24 |
| -) |
| 1 | +# #Requires -Module @{ ModuleName="Pester"; ModuleVersion="5.0"} |
| 2 | +# param( |
| 3 | +# $ModuleName = "FabricTools", |
| 4 | +# $expectedParams = @( |
| 5 | +# "statusCode" |
| 6 | +# "response" |
| 7 | +# "responseHeader" |
| 8 | +# "Name" |
| 9 | +# "typeName" |
| 10 | +# "Verbose" |
| 11 | +# "Debug" |
| 12 | +# "ErrorAction" |
| 13 | +# "WarningAction" |
| 14 | +# "InformationAction" |
| 15 | +# "ProgressAction" |
| 16 | +# "ErrorVariable" |
| 17 | +# "WarningVariable" |
| 18 | +# "InformationVariable" |
| 19 | +# "OutVariable" |
| 20 | +# "OutBuffer" |
| 21 | +# "PipelineVariable" |
25 | 22 |
|
26 |
| -Describe "Test-FabricApiResponse" -Tag "UnitTests" { |
| 23 | +# ) |
| 24 | +# ) |
27 | 25 |
|
28 |
| - BeforeDiscovery { |
29 |
| - $command = Get-Command -Name Test-FabricApiResponse |
30 |
| - $expected = $expectedParams |
31 |
| - } |
| 26 | +# Describe "Test-FabricApiResponse" -Tag "UnitTests" { |
32 | 27 |
|
33 |
| - Context "Parameter validation" { |
34 |
| - BeforeAll { |
35 |
| - $command = Get-Command -Name Test-FabricApiResponse |
36 |
| - $expected = $expectedParams |
37 |
| - } |
| 28 | +# BeforeDiscovery { |
| 29 | +# $command = Get-Command -Name Test-FabricApiResponse |
| 30 | +# $expected = $expectedParams |
| 31 | +# } |
38 | 32 |
|
39 |
| - It "Has parameter: <_>" -ForEach $expected { |
40 |
| - $command | Should -HaveParameter $PSItem |
41 |
| - } |
| 33 | +# Context "Parameter validation" { |
| 34 | +# BeforeAll { |
| 35 | +# $command = Get-Command -Name Test-FabricApiResponse |
| 36 | +# $expected = $expectedParams |
| 37 | +# } |
42 | 38 |
|
43 |
| - It "Should have exactly the number of expected parameters $($expected.Count)" { |
44 |
| - $hasparms = $command.Parameters.Values.Name |
45 |
| - #$hasparms.Count | Should -BeExactly $expected.Count |
46 |
| - Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty |
47 |
| - } |
48 |
| - } |
49 |
| -} |
| 39 | +# It "Has parameter: <_>" -ForEach $expected { |
| 40 | +# $command | Should -HaveParameter $PSItem |
| 41 | +# } |
50 | 42 |
|
| 43 | +# It "Should have exactly the number of expected parameters $($expected.Count)" { |
| 44 | +# $hasparms = $command.Parameters.Values.Name |
| 45 | +# #$hasparms.Count | Should -BeExactly $expected.Count |
| 46 | +# Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty |
| 47 | +# } |
| 48 | +# } |
| 49 | +# } |
0 commit comments