The current handling of success/fail is a bit confusing/complicated. After adding bool properties TestCode, TestText, TestHeaders, and TestCert we could calculate a simple [bool]$Pass property instead of requiring a $null check against TestResult.Result.