Exemplo n.º 1
0
        public void Constructor_GivenNullResults_DoesNotSetChecks()
        {
            IEnumerable <HealthCheckResult> results = null;

            var response = new HealthResponse(results);

            response.Checks.Should().BeNull();
            response.GetChecks().Should().BeEmpty();
        }
Exemplo n.º 2
0
        public void Constructor_GivenEmptyResults_DoesNotSetChecks()
        {
            var results = Enumerable.Empty <HealthCheckResult>();

            var response = new HealthResponse(results);

            response.Checks.Should().BeNull();
            response.GetChecks().Should().BeEmpty();
        }
Exemplo n.º 3
0
        public void Constructor_SetsChecks()
        {
            var results = new[] { new HealthCheckResult(), new HealthCheckResult() };

            var response = new HealthResponse(results);

            response.Checks.Should().NotBeNull();
            response.GetChecks().Should().BeEquivalentTo(results);
        }