public void CreateHealthCheckResult_GivenNullHealthCheck_Throws() { IHealthCheck healthCheck = null; Action act = () => healthCheck.CreateHealthCheckResult(); act.Should().ThrowExactly <ArgumentNullException>().WithMessage("*healthCheck*"); }
private HealthCheckResult[] GetExceptionHealthCheckResult(IHealthCheck healthCheck, Exception ex) { var result = healthCheck.CreateHealthCheckResult(); result.Output = $"Exception in health check of type {healthCheck.GetType()}:\r\n{ex}"; if (UncaughtExceptionStatus != null) { result.Status = UncaughtExceptionStatus; } return(new[] { result }); }