Update PowerShellGithubDev.Tests.ps1

This commit is contained in:
Sergei Vorobev 2016-07-13 19:28:19 -07:00
parent bc6990f46b
commit 6c087155a7

View File

@ -46,7 +46,7 @@ try
} }
# this Describe makes sure we binplace all the files, like psd1, psm1, ps1xml and load usable modules from them # this Describe makes sure we binplace all the files, like psd1, psm1, ps1xml and load usable modules from them
Describe 'Modules for the packge' { Describe 'Modules for the package' {
Context '$env:DEVPATH Modules loading' { Context '$env:DEVPATH Modules loading' {
It 'loads Microsoft.PowerShell.LocalAccounts' { It 'loads Microsoft.PowerShell.LocalAccounts' {
try try
@ -116,6 +116,8 @@ try
{ {
Import-Module CimCmdlets -ErrorAction Stop Import-Module CimCmdlets -ErrorAction Stop
Get-CimClass -ClassName CIM_Error | Should Not Be $null Get-CimClass -ClassName CIM_Error | Should Not Be $null
[Microsoft.Management.Infrastructure.CimCmdlets.AsyncResultType].Assembly.Location | Should Be (
Join-Path $env:DEVPATH Microsoft.Management.Infrastructure.CimCmdlets.dll)
} }
finally finally
{ {
@ -123,6 +125,20 @@ try
} }
} }
It 'loads Microsoft.WSMan.Management' {
try
{
Import-Module Microsoft.WSMan.Management -ErrorAction Stop
Test-WSMan | Should Not Be $null
[Microsoft.WSMan.Management.TestWSManCommand].Assembly.Location | Should Be (
Join-Path $env:DEVPATH Microsoft.WSMan.Management.dll)
}
finally
{
Remove-Module -ErrorAction SilentlyContinue Microsoft.WSMan.Management
}
}
It 'loads Microsoft.PowerShell.Diagnostics' { It 'loads Microsoft.PowerShell.Diagnostics' {
try try
{ {