Skip to content

Commit

Permalink
Include Pester testing for additional cmdlets
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaulson45 committed Oct 4, 2023
1 parent 71aff60 commit 8481aff
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ Describe "Testing Health Checker by Mock Data Imports" {
Mock Get-ReceiveConnector { return Import-Clixml "$Script:MockDataCollectionRoot\Exchange\GetReceiveConnector.xml" }
Mock Get-SendConnector { return Import-Clixml "$Script:MockDataCollectionRoot\Exchange\GetSendConnector.xml" }
Mock Get-DynamicDistributionGroup { return Import-Clixml "$Script:MockDataCollectionRoot\Exchange\GetDynamicDistributionGroupPfMailboxes.xml" }
Mock Get-ActiveSyncVirtualDirectory { return $null }
Mock Get-AutodiscoverVirtualDirectory { return $null }
Mock Get-EcpVirtualDirectory { return $null }
Mock Get-MapiVirtualDirectory { return $null }
Mock Get-OutlookAnywhere { return $null }
Mock Get-PowerShellVirtualDirectory { return $null }

$Error.Clear()
Get-OrganizationInformation -EdgeServer $false | Out-Null
Expand Down Expand Up @@ -92,6 +98,12 @@ Describe "Testing Health Checker by Mock Data Imports" {
Assert-MockCalled Get-ExchangeDiagnosticInfo -Exactly 1
Assert-MockCalled Get-ExchangeADSplitPermissionsEnabled -Exactly 1
Assert-MockCalled Get-DynamicDistributionGroup -Exactly 1
Assert-MockCalled Get-ActiveSyncVirtualDirectory -Exactly 1
Assert-MockCalled Get-AutodiscoverVirtualDirectory -Exactly 1
Assert-MockCalled Get-EcpVirtualDirectory -Exactly 1
Assert-MockCalled Get-MapiVirtualDirectory -Exactly 1
Assert-MockCalled Get-OutlookAnywhere -Exactly 1
Assert-MockCalled Get-PowerShellVirtualDirectory -Exactly 1
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,18 @@ function Get-OrganizationConfig {
function Get-DynamicDistributionGroup {
return Import-Clixml "$Script:MockDataCollectionRoot\Exchange\GetDynamicDistributionGroupPfMailboxes.xml"
}
# virtual directory cmdlets to return null till we do actual checks against the vDirs.
function Get-ActiveSyncVirtualDirectory { return $null }

function Get-AutodiscoverVirtualDirectory { return $null }

function Get-EcpVirtualDirectory { return $null }

function Get-MapiVirtualDirectory { return $null }

function Get-OutlookAnywhere { return $null }

function Get-PowerShellVirtualDirectory { return $null }

function Get-HybridConfiguration { return $null }

Expand Down

0 comments on commit 8481aff

Please sign in to comment.