public void Adding_check_makes_it_available() { const string name = "test"; HealthChecks.Add(name, () => false); var exists = HealthChecks.Exists(name); exists.Should().BeTrue(); }
public Settings AddHealthCheckEndpoint(string name, string uri) { HealthChecks.Add(new HealthCheckSetting { Name = name, Uri = uri }); return(this); }
public void When_check_succeeds_a_success_is_returned() { const string name = "test"; const bool expectedResult = true; HealthChecks.Add(name, () => expectedResult); var results = HealthChecks.RunAll(); results.Should().Contain(name, expectedResult); }
public void RegisterHealthCheck(string name, HealthCheck healthCheck) { HealthChecks.Add(name, healthCheck); }
public HealthChecksBuilder AddCheck(string name, Func <HealthCheckResult> check) { HealthChecks.Add(name, new Registration(new LambdaHealthCheck(check))); return(this); }
public HealthChecksBuilder AddCheck <T>(string name) where T : IHealthCheck { HealthChecks.Add(name, new Registration(typeof(T))); return(this); }
public HealthChecksBuilder AddCheck(string name, IHealthCheck healthCheck) { HealthChecks.Add(name, new Registration(healthCheck)); return(this); }