Beispiel #1
0
        public void HandlesUnknown()
        {
            // arrange
            var contributor = new LivenessHealthContributor(availability);

            // act
            var result = contributor.Health();

            // assert
            Assert.Equal(HealthStatus.UNKNOWN, result.Status);
        }
Beispiel #2
0
        public void HandlesBroken()
        {
            // arrange
            availability.SetAvailabilityState(availability.LivenessKey, LivenessState.Broken, "tests");
            var contributor = new LivenessHealthContributor(availability);

            // act
            var result = contributor.Health();

            // assert
            Assert.Equal(HealthStatus.DOWN, result.Status);
        }