Beispiel #1
0
        public async Task ReturnsTrueIfNoHealthCheck()
        {
            var logger     = new Mock <ILogger <HealthProvider> >();
            var sut        = new HealthProvider(logger.Object);
            var healthData = await sut.GetHealthAsync().ConfigureAwait(false);

            healthData.Status.Should().Be("Healthy");
        }
Beispiel #2
0
        public async Task ReturnsResultIfHealthCheckConfigured()
        {
            var logger = new Mock <ILogger <HealthProvider> >();

            var sut        = new HealthProvider(logger.Object, new HealthCheckServiceStub());
            var healthData = await sut.GetHealthAsync().ConfigureAwait(false);

            healthData.Status.Should().Be("Healthy");
        }