5 writes to ResultStatusCodes
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (5)
HealthCheckMiddlewareTests.cs (5)
382ResultStatusCodes = 912var options = new HealthCheckOptions { ResultStatusCodes = null }; 924ResultStatusCodes = new Dictionary<HealthStatus, int> 937new HealthCheckOptions { ResultStatusCodes = new Dictionary<HealthStatus, int>() } 950ResultStatusCodes = new Dictionary<HealthStatus, int>
11 references to ResultStatusCodes
Microsoft.AspNetCore.Diagnostics.HealthChecks (3)
HealthCheckMiddleware.cs (2)
49if (!_healthCheckOptions.ResultStatusCodes.TryGetValue(result.Status, out var statusCode)) 53$"{nameof(HealthCheckOptions)}.{nameof(HealthCheckOptions.ResultStatusCodes)} must contain" +
HealthCheckOptions.cs (1)
57$"The {nameof(ResultStatusCodes)} dictionary must include an entry for all possible " +
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (8)
HealthCheckMiddlewareTests.cs (8)
903Assert.NotNull(options.ResultStatusCodes); 904Assert.Equal(StatusCodes.Status200OK, options.ResultStatusCodes[HealthStatus.Healthy]); 905Assert.Equal(StatusCodes.Status200OK, options.ResultStatusCodes[HealthStatus.Degraded]); 906Assert.Equal(StatusCodes.Status503ServiceUnavailable, options.ResultStatusCodes[HealthStatus.Unhealthy]); 913Assert.NotNull(options.ResultStatusCodes); 914Assert.Equal(StatusCodes.Status200OK, options.ResultStatusCodes[HealthStatus.Healthy]); 915Assert.Equal(StatusCodes.Status200OK, options.ResultStatusCodes[HealthStatus.Degraded]); 916Assert.Equal(StatusCodes.Status503ServiceUnavailable, options.ResultStatusCodes[HealthStatus.Unhealthy]);