@@ -123,21 +123,21 @@ Describe "PowerShellGet - Module tests" -tags "Feature" {
123
123
124
124
It " Should find a module correctly" {
125
125
$psgetModuleInfo = Find-Module - Name $ContosoServer - Repository $RepositoryName
126
- $psgetModuleInfo.Name | Should Be $ContosoServer
127
- $psgetModuleInfo.Repository | Should Be $RepositoryName
126
+ $psgetModuleInfo.Name | Should - Be $ContosoServer
127
+ $psgetModuleInfo.Repository | Should - Be $RepositoryName
128
128
}
129
129
130
130
It " Should install a module correctly to the required location with CurrentUser scope" {
131
131
Install-Module - Name $ContosoServer - Repository $RepositoryName - Scope CurrentUser
132
132
$installedModuleInfo = Get-InstalledModule - Name $ContosoServer
133
133
134
- $installedModuleInfo | Should Not Be $null
135
- $installedModuleInfo.Name | Should Be $ContosoServer
136
- $installedModuleInfo.InstalledLocation.StartsWith ($script :MyDocumentsModulesPath , [System.StringComparison ]::OrdinalIgnoreCase) | Should Be $true
134
+ $installedModuleInfo | Should - Not- BeNullOrEmpty
135
+ $installedModuleInfo.Name | Should - Be $ContosoServer
136
+ $installedModuleInfo.InstalledLocation.StartsWith ($script :MyDocumentsModulesPath , [System.StringComparison ]::OrdinalIgnoreCase) | Should - BeTrue
137
137
138
138
$module = Get-Module $ContosoServer - ListAvailable
139
- $module.Name | Should be $ContosoServer
140
- $module.ModuleBase | Should Be $installedModuleInfo.InstalledLocation
139
+ $module.Name | Should - Be $ContosoServer
140
+ $module.ModuleBase | Should - Be $installedModuleInfo.InstalledLocation
141
141
}
142
142
143
143
AfterAll {
@@ -163,13 +163,13 @@ Describe "PowerShellGet - Module tests (Admin)" -tags @('Feature', 'RequireAdmin
163
163
Install-Module - Name $ContosoServer - Repository $RepositoryName
164
164
$installedModuleInfo = Get-InstalledModule - Name $ContosoServer
165
165
166
- $installedModuleInfo | Should Not Be $null
167
- $installedModuleInfo.Name | Should Be $ContosoServer
168
- $installedModuleInfo.InstalledLocation.StartsWith ($script :programFilesModulesPath , [System.StringComparison ]::OrdinalIgnoreCase) | Should Be $true
166
+ $installedModuleInfo | Should - Not - BeNullOrEmpty
167
+ $installedModuleInfo.Name | Should - Be $ContosoServer
168
+ $installedModuleInfo.InstalledLocation.StartsWith ($script :programFilesModulesPath , [System.StringComparison ]::OrdinalIgnoreCase) | Should - BeTrue
169
169
170
170
$module = Get-Module $ContosoServer - ListAvailable
171
- $module.Name | Should be $ContosoServer
172
- $module.ModuleBase | Should Be $installedModuleInfo.InstalledLocation
171
+ $module.Name | Should - Be $ContosoServer
172
+ $module.ModuleBase | Should - Be $installedModuleInfo.InstalledLocation
173
173
}
174
174
175
175
AfterAll {
@@ -197,17 +197,17 @@ Describe "PowerShellGet - Script tests" -tags "Feature" {
197
197
198
198
It " Should find a script correctly" {
199
199
$psgetScriptInfo = Find-Script - Name $FabrikamServerScript - Repository $RepositoryName
200
- $psgetScriptInfo.Name | Should Be $FabrikamServerScript
201
- $psgetScriptInfo.Repository | Should Be $RepositoryName
200
+ $psgetScriptInfo.Name | Should - Be $FabrikamServerScript
201
+ $psgetScriptInfo.Repository | Should - Be $RepositoryName
202
202
}
203
203
204
204
It " Should install a script correctly to the required location with CurrentUser scope" {
205
205
Install-Script - Name $FabrikamServerScript - Repository $RepositoryName - Scope CurrentUser - NoPathUpdate
206
206
$installedScriptInfo = Get-InstalledScript - Name $FabrikamServerScript
207
207
208
- $installedScriptInfo | Should Not Be $null
209
- $installedScriptInfo.Name | Should Be $FabrikamServerScript
210
- $installedScriptInfo.InstalledLocation.StartsWith ($script :MyDocumentsScriptsPath , [System.StringComparison ]::OrdinalIgnoreCase) | Should Be $true
208
+ $installedScriptInfo | Should - Not - BeNullOrEmpty
209
+ $installedScriptInfo.Name | Should - Be $FabrikamServerScript
210
+ $installedScriptInfo.InstalledLocation.StartsWith ($script :MyDocumentsScriptsPath , [System.StringComparison ]::OrdinalIgnoreCase) | Should - BeTrue
211
211
}
212
212
213
213
AfterAll {
@@ -233,9 +233,9 @@ Describe "PowerShellGet - Script tests (Admin)" -tags @('Feature', 'RequireAdmin
233
233
Install-Script - Name $FabrikamServerScript - Repository $RepositoryName - NoPathUpdate
234
234
$installedScriptInfo = Get-InstalledScript - Name $FabrikamServerScript
235
235
236
- $installedScriptInfo | Should Not Be $null
237
- $installedScriptInfo.Name | Should Be $FabrikamServerScript
238
- $installedScriptInfo.InstalledLocation.StartsWith ($script :ProgramFilesScriptsPath , [System.StringComparison ]::OrdinalIgnoreCase) | Should Be $true
236
+ $installedScriptInfo | Should - Not - BeNullOrEmpty
237
+ $installedScriptInfo.Name | Should - Be $FabrikamServerScript
238
+ $installedScriptInfo.InstalledLocation.StartsWith ($script :ProgramFilesScriptsPath , [System.StringComparison ]::OrdinalIgnoreCase) | Should - BeTrue
239
239
}
240
240
241
241
AfterAll {
@@ -269,8 +269,8 @@ Describe 'PowerShellGet Type tests' -tags @('CI') {
269
269
$PowerShellGetTypeDetails.GetEnumerator () | ForEach-Object {
270
270
$ClassName = $_.Name
271
271
$Type = " $PowerShellGetNamespace .$ClassName " -as [Type ]
272
- $Type | Select-Object - ExpandProperty Name | Should Be $ClassName
273
- $_.Value | ForEach-Object { $Type.DeclaredMembers.Name -contains $_ | Should Be $true }
272
+ $Type | Select-Object - ExpandProperty Name | Should - Be $ClassName
273
+ $_.Value | ForEach-Object { $Type.DeclaredMembers.Name -contains $_ | Should - BeTrue }
274
274
}
275
275
}
276
276
}
0 commit comments