5 writes to ResultStatusCodes
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (5)
HealthCheckMiddlewareTests.cs (5)
382
ResultStatusCodes
=
912
var options = new HealthCheckOptions {
ResultStatusCodes
= null };
924
ResultStatusCodes
= new Dictionary<HealthStatus, int>
937
new HealthCheckOptions {
ResultStatusCodes
= new Dictionary<HealthStatus, int>() }
950
ResultStatusCodes
= new Dictionary<HealthStatus, int>
11 references to ResultStatusCodes
Microsoft.AspNetCore.Diagnostics.HealthChecks (3)
HealthCheckMiddleware.cs (2)
49
if (!_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)
903
Assert.NotNull(options.
ResultStatusCodes
);
904
Assert.Equal(StatusCodes.Status200OK, options.
ResultStatusCodes
[HealthStatus.Healthy]);
905
Assert.Equal(StatusCodes.Status200OK, options.
ResultStatusCodes
[HealthStatus.Degraded]);
906
Assert.Equal(StatusCodes.Status503ServiceUnavailable, options.
ResultStatusCodes
[HealthStatus.Unhealthy]);
913
Assert.NotNull(options.
ResultStatusCodes
);
914
Assert.Equal(StatusCodes.Status200OK, options.
ResultStatusCodes
[HealthStatus.Healthy]);
915
Assert.Equal(StatusCodes.Status200OK, options.
ResultStatusCodes
[HealthStatus.Degraded]);
916
Assert.Equal(StatusCodes.Status503ServiceUnavailable, options.
ResultStatusCodes
[HealthStatus.Unhealthy]);