コード例 #1
0
        private void ShouldUpdateHealthCheckStatusWhenStatusAlreadyExists()
        {
            Dictionary <string, string> status1 = new Dictionary <string, string> {
                { "Service1", "Unhealthy" }, { "Service2", "Healthy" }
            };
            HealthCheckStatus healthCheckStatus = new HealthCheckStatus();

            healthCheckStatus.AddStatus("health", status1);
            Dictionary <string, string> status2 = new Dictionary <string, string> {
                { "Service1", "Healthy" }, { "Service2", "Healthy" }
            };

            healthCheckStatus.AddStatus("health", status2);

            Dictionary <string, string> result = healthCheckStatus.GetStatus("health");

            result.Should().Equal(status2);
        }
コード例 #2
0
        private void ShouldAddHealthCheckStatusWhenAddStatusIsInvoked()
        {
            Dictionary <string, string> status = new Dictionary <string, string> {
                { "Service1", "Unhealthy" }, { "Service2", "Healthy" }
            };
            HealthCheckStatus healthCheckStatus = new HealthCheckStatus();

            healthCheckStatus.AddStatus("health", status);

            Dictionary <string, string> result = healthCheckStatus.GetStatus("health");

            result.Should().Equal(status);
        }