Increase code coverage #22

Merged
OCram85 merged 34 commits from dev into master 2018-03-21 12:16:09 +01:00
Showing only changes of commit 7e2da468d5 - Show all commits

View File

@ -33,12 +33,11 @@ Describe "Test-ModuleName" {
Context "Working with PSSnapins" { Context "Working with PSSnapins" {
It "Loading first PSSnaping should not throw " { It "Loading first PSSnaping should not throw " {
$Snap = Get-PSSnapin -Registered $Snap = Get-PSSnapin -Registered
$Snap | Format-List | Out-String | Write-Verbose -Verbose $Snap = Get-PSSnapin -Registered | Select-Object -First 1
{ $loaded = Test-Module -Name $Snap.Name -Type PSSnapin } | Should -Not -Throw { $loaded = Test-Module -Name $Snap.Name -Type PSSnapin } | Should -Not -Throw
} }
It "Loading first PSSnaping should return true" { It "Loading first PSSnaping should return true" {
$Snap = Get-PSSnapin -Registered $Snap = Get-PSSnapin -Registered | Select-Object -First 1
$Snap | Format-List | Out-String | Write-Verbose -Verbose
Test-Module -Name $Snap.Name -Type PSSnapin | Should -Be $true Test-Module -Name $Snap.Name -Type PSSnapin | Should -Be $true
} }
} }