Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Describe "Testing Get-ExchangeServerCertificates.ps1" {
BeforeAll {
Mock Get-AuthConfig -MockWith { return Import-Clixml $Script:parentPath\Tests\GetAuthConfig.xml }
Mock Get-ExchangeCertificate -MockWith { return Import-Clixml $Script:parentPath\Tests\GetExchangeCertificate.xml }
Mock Get-Date -MockWith { return ([System.Convert]::ToDateTime("01/01/2022", [System.Globalization.DateTimeFormatInfo]::InvariantInfo)) }
}

Context "Valid Exchange Server Certificates Detected" {
Expand All @@ -43,6 +44,7 @@ Describe "Testing Get-ExchangeServerCertificates.ps1" {
$results[0].SignatureHashAlgorithm | Should -Be "sha1"
$results[0].SignatureHashAlgorithmSecure | Should -Be 1
$results[0].IsSanCertificate | Should -Be $false
$results[0].LifetimeInDays | Should -Be 1652
$results[0].PublicKeySize | Should -Be 2048
}

Expand All @@ -55,6 +57,7 @@ Describe "Testing Get-ExchangeServerCertificates.ps1" {
$results[1].SignatureHashAlgorithmSecure | Should -Be 1
$results[1].IsSanCertificate | Should -Be $true
($results[1].Namespaces).Count | Should -Be 2
$results[1].LifetimeInDays | Should -Be 1678
$results[1].PublicKeySize | Should -Be 2048
}

Expand Down