Increase code coverage (#22)

This commit is contained in:
2018-03-21 12:16:09 +01:00
committed by GitHub
parent 2422afbd8f
commit ce823d4564
13 changed files with 293 additions and 4 deletions

View File

@ -32,6 +32,7 @@ function Get-RandomKey {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[ValidateSet(16, 24, 32)]
[string]$size
)

View File

@ -83,14 +83,14 @@ Could not find the required {0} called {1}. Please install the required {0} to r
}
'PSSnapin' {
if (Get-PSSnapin -Name $Name -Registered) {
if (Get-PSSnapin -Name $Name -Registered -ErrorAction SilentlyContinue) {
return $true
}
else {
if ($StopIfFails) {
Write-Error -Message $Message -ErrorAction Stop -Category NotInstalled
return $false
}
return $false
}
}