diff --git a/src/Private/Test-CSPfxCertificate.Tests.ps1 b/src/Private/Test-CSPfxCertificate.Tests.ps1 new file mode 100644 index 0000000..f1405d1 --- /dev/null +++ b/src/Private/Test-CSPfxCertificate.Tests.ps1 @@ -0,0 +1,25 @@ +BeforeAll { + $ManifestFile = (Get-Item -Path "./src/*.psd1").FullName + Import-Module $ManifestFile -Force + + $PrivateFunctions = (Get-ChildItem -Path "./src/Private/*.ps1" | Where-Object { + $_.BaseName -notmatch '.Tests' + } + ).FullName + foreach ( $func in $PrivateFunctions) { + . $func + } +} + +Describe "Test-CSPfxCertificate" { + Context "Basic Tests" { + It "Should not Throw" { + { + Test-CSPfxCertificate -Thumbprint '12345' -StoreName My -StoreLocation CurrentUser + } | Should -Not -Throw + } + It "Should return false" { + Test-CSPfxCertificate -Thumbprint '12345' -StoreName My -StoreLocation CurrentUser | Should -Be $false + } + } +} diff --git a/tests/PfxCertificate/60_Test-CSPfxCertificate.Tests.ps1 b/tests/PfxCertificate/60_Test-CSPfxCertificate.Tests.ps1 deleted file mode 100644 index 9665cb6..0000000 --- a/tests/PfxCertificate/60_Test-CSPfxCertificate.Tests.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -Describe "Test-CSPfxCertificate" { - Context "Basic Tests" { - It "Should not Throw" { - { Test-CSPfxCertificate -Thumbprint '12345' -StoreName My -StoreLocation CurrentUser } | Should -Not -Throw - } - It "Should return false" { - Test-CSPfxCertificate -Thumbprint '12345' -StoreName My -StoreLocation CurrentUser | Should -Be $false - } - } -}