示例#1
0
        public void Constructor_GivenNullResults_DoesNotSetChecks()
        {
            IEnumerable <HealthCheckResult> results = null;

            var response = new HealthResponse(results);

            response.Checks.Should().BeNull();
            response.GetChecks().Should().BeEmpty();
        }
示例#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();
        }
示例#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);
        }