2. Conventional EPAF user guide
Step 11 — Test
Describe 'Get-DatabaseStorageHealth' {
It 'Returns Warning at threshold' {
(Get-DatabaseStorageHealth -DatabaseName TestDB -UtilizationPercent 80).Status | Should -Be 'Warning'
}
}
Invoke-Pester -Path ./Tests -CILoad the function using the approved test setup. Test healthy, warning, critical and invalid threshold ordering.
Detailed reference
Additional Pester acceptance examples
Describe 'Storage classification' {
It 'Classifies 50 percent as healthy' {
(Get-DatabaseStorageHealth -DatabaseName TestDB -UtilizationPercent 50).Status | Should -Be 'Healthy'
}
It 'Classifies 90 percent as critical' {
(Get-DatabaseStorageHealth -DatabaseName TestDB -UtilizationPercent 90).Status | Should -Be 'Critical'
}
It 'Rejects inverted thresholds' {
{ Get-DatabaseStorageHealth -DatabaseName TestDB -UtilizationPercent 50 -WarningThreshold 95 -CriticalThreshold 90 } | Should -Throw
}
}Import the function through approved test setup. Include boundary, failure, integration, security, configuration and platform tests. Pester success alone is not a complete Quality Gate.