From ef3fd6d0d691cdb7fcc5033ea29ac998b5d6ad12 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Tue, 28 Jun 2022 11:53:39 +0200 Subject: [PATCH] wip --- src/Private/Test-CSPfxCertificate.Tests.ps1 | 25 +++++++++++++++++++ .../60_Test-CSPfxCertificate.Tests.ps1 | 10 -------- 2 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 src/Private/Test-CSPfxCertificate.Tests.ps1 delete mode 100644 tests/PfxCertificate/60_Test-CSPfxCertificate.Tests.ps1 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 - } - } -}