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 f4bac76d60 - Show all commits

View File

@ -37,4 +37,11 @@ Describe "Get-CredentialStore" {
{ Get-CredentialStore -Path 'C:\foobar\CredentialStore.json' -Shared }| Should -Throw "Could not find the CredentialStore." { Get-CredentialStore -Path 'C:\foobar\CredentialStore.json' -Shared }| Should -Throw "Could not find the CredentialStore."
} }
} }
Context "Testing invalid json data" {
Mock Test-CredentialStore {return $true}
Mock Get-Content {return '"foo":"bar",'}
It "Should throw with invalid CredentialStore" {
{ Get-Credentialstore -Path "C:\dummy.json"} | Should -Throw "Unknown CredentialStore format. Invalid JSON file."
}
}
} }