|
4 | 4 | [CmdletBinding()]
|
5 | 5 | param()
|
6 | 6 | Describe 'Context' {
|
7 |
| - Context 'Function: Get-Context' { |
8 |
| - It 'Function is be available' { |
9 |
| - Get-Command -Name 'Get-Context' | Should -Not -BeNullOrEmpty |
10 |
| - } |
11 |
| - |
12 |
| - It 'Get-Context - Should return all contexts' { |
13 |
| - { Get-Context } | Should -Not -Throw |
14 |
| - } |
15 |
| - |
16 |
| - It "Get-Context -Name '*' - Should return all contexts" { |
17 |
| - { Get-Context -Name '*' } | Should -Not -Throw |
18 |
| - } |
19 |
| - |
20 |
| - It "Get-Context -Name '' - Should return no contexts" { |
21 |
| - { Get-Context -Name '' } | Should -Not -Throw |
22 |
| - Get-Context -Name '' | Should -BeNullOrEmpty |
23 |
| - } |
24 |
| - It 'Get-Context -Name $null - Should return no contexts' { |
25 |
| - { Get-Context -Name $null } | Should -Not -Throw |
26 |
| - Get-Context -Name $null | Should -BeNullOrEmpty |
27 |
| - } |
28 |
| - } |
29 |
| - |
30 | 7 | Context 'Function: Set-Context' {
|
31 | 8 | It 'Function is be available' {
|
32 | 9 | Get-Command -Name 'Set-Context' | Should -Not -BeNullOrEmpty
|
@@ -71,6 +48,29 @@ Describe 'Context' {
|
71 | 48 | }
|
72 | 49 | }
|
73 | 50 |
|
| 51 | + Context 'Function: Get-Context' { |
| 52 | + It 'Function is be available' { |
| 53 | + Get-Command -Name 'Get-Context' | Should -Not -BeNullOrEmpty |
| 54 | + } |
| 55 | + |
| 56 | + It 'Get-Context - Should return all contexts' { |
| 57 | + { Get-Context } | Should -Not -Throw |
| 58 | + } |
| 59 | + |
| 60 | + It "Get-Context -Name '*' - Should return all contexts" { |
| 61 | + { Get-Context -Name '*' } | Should -Not -Throw |
| 62 | + } |
| 63 | + |
| 64 | + It "Get-Context -Name '' - Should return no contexts" { |
| 65 | + { Get-Context -Name '' } | Should -Not -Throw |
| 66 | + Get-Context -Name '' | Should -BeNullOrEmpty |
| 67 | + } |
| 68 | + It 'Get-Context -Name $null - Should return no contexts' { |
| 69 | + { Get-Context -Name $null } | Should -Not -Throw |
| 70 | + Get-Context -Name $null | Should -BeNullOrEmpty |
| 71 | + } |
| 72 | + } |
| 73 | + |
74 | 74 | Context 'Function: Remove-Context' {
|
75 | 75 | It 'Function is be available' {
|
76 | 76 | Get-Command -Name 'Remove-Context' | Should -Not -BeNullOrEmpty
|
|
0 commit comments