Esempio n. 1
0
 public HealthIndicator Get()
 {
     _logger.Information("Health endpoint called.");
     return(new HealthIndicator(_applicationHealthService.IsApplicationHealthy(),
                                _serverHealthService.IsServerHealthy(),
                                _databaseHealthService.IsDatabaseHealthy(),
                                _serverHealthService.Hostname,
                                _dateTimeService.Now()));
 }
        public void PassedApplicationHealthShouldBeIReturnedByGet(bool value)
        {
            // arrange
            _applicationHealthService.IsApplicationHealthy().Returns(value);

            // act
            var result = _subject.Get();

            // assert
            result.ApplicationHealthy.Should().Be(value);
        }