public void GivenDatabaseHealthList_ReturnsHealthResponse(bool isSystemHealthy) { var healthCheckOutputs = ConfigureHealthCheckOutputs(isSystemHealthy); ConfigureHealthCheckResponse(isSystemHealthy, healthCheckOutputs); var response = _healthCheckService.CheckSystemHealth(); response.IsSystemHealthy.ShouldBe(isSystemHealthy); }
public IHttpActionResult Get() { var healthCheckResponse = _healthCheckService.CheckSystemHealth(); if (healthCheckResponse.IsSystemHealthy) { return(Content(HttpStatusCode.OK, healthCheckResponse)); } return(Content(HttpStatusCode.InternalServerError, healthCheckResponse)); }