From aef82de1490b504d449ce1a2703d10bf6892ab81 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Tue, 28 Jun 2022 09:57:22 +0200 Subject: [PATCH] test Pester5 file --- src/Certificate/New-CSCertAttribute.Tests.ps1 | 22 +++++++++++++++++++ .../50_New-CSCertAttribute.Tests.ps1 | 7 ------ 2 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 src/Certificate/New-CSCertAttribute.Tests.ps1 delete mode 100644 tests/Certificate/50_New-CSCertAttribute.Tests.ps1 diff --git a/src/Certificate/New-CSCertAttribute.Tests.ps1 b/src/Certificate/New-CSCertAttribute.Tests.ps1 new file mode 100644 index 0000000..dbd77a3 --- /dev/null +++ b/src/Certificate/New-CSCertAttribute.Tests.ps1 @@ -0,0 +1,22 @@ +BeforeAll { + $ManifestFile = (Get-Item -Path "./src/*.psd1").FullName + Import-Module $ManifestFile -Force +} + +Describe "New-CSCertAttribute" { + Context "Basis Tests" { + It "TShould not throw" { + { + $AttribParams = @{ + Country = 'DE' + State = 'BW' + City = 'KA' + Organization = 'IT' + OrganizationalUnitName = '' + CommonName = 'MyCert' + } + New-CSCertAttribute @AttribParams + } | Should -Not -Throw + } + } +} diff --git a/tests/Certificate/50_New-CSCertAttribute.Tests.ps1 b/tests/Certificate/50_New-CSCertAttribute.Tests.ps1 deleted file mode 100644 index e6f5cb4..0000000 --- a/tests/Certificate/50_New-CSCertAttribute.Tests.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -Describe "New-CSCertAttribute" { - Context "Basis Tests" { - It "Test1: Should not throw " { - { New-CSCertAttribute -Country 'DE' -State 'BW' -City 'KA' -Organization 'IT' -OrganizationalUnitName'' -CommonName 'Mycert' } | Should -Not -Throw - } - } -}