Increase code coverage #22
@ -88,9 +88,9 @@ Describe "New-CredentialStoreItem" {
|
|||||||
}
|
}
|
||||||
Context "General Exception handling" {
|
Context "General Exception handling" {
|
||||||
Mock Test-CredentialStore {return $false}
|
Mock Test-CredentialStore {return $false}
|
||||||
|
Mock Get-Credential {
|
||||||
$UserName = 'myUser'
|
$UserName = 'myUser'
|
||||||
$Password = ConvertTo-SecureString -String "mypasswd" -AsPlainText -Force
|
$Password = ConvertTo-SecureString -String "mypasswd" -AsPlainText -Force
|
||||||
Mock Get-Credential {
|
|
||||||
return [PSCredential]::new($UserName, $Password)
|
return [PSCredential]::new($UserName, $Password)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user