Пример #1
0
        public void CreateUIReportFromReportWithEntries()
        {
            HealthReport healthReport = CreateHealthReport(HealthStatus.Healthy);
            var          uiReport     = UIHealthCheckReport.CreateFrom(healthReport);

            uiReport.Entries.Count.Should().Be(healthReport.Entries.Count);
        }
Пример #2
0
        public void CreateUIReportFromReportWithDifferentStatusesUnhealthyFirst()
        {
            HealthReport healthReport = CreateMultiStatusHealthReport(new List <HealthStatus>()
            {
                HealthStatus.Unhealthy,
                HealthStatus.Healthy
            });
            var uiReport = UIHealthCheckReport.CreateFrom(healthReport);

            uiReport.Status.Should().Be(HealthStatus.Unhealthy);
        }
Пример #3
0
        public void CreateUIReportFromSpecificReportStatus(HealthStatus healthStatus)
        {
            var uiReport = UIHealthCheckReport.CreateFrom(CreateHealthReport(healthStatus));

            uiReport.Status.Should().Be(healthStatus);
        }
Пример #4
0
        public void CreateUIReportFromReportWithDuration()
        {
            var uiReport = UIHealthCheckReport.CreateFrom(CreateHealthReport(HealthStatus.Healthy));

            uiReport.TotalDuration.Seconds.Should().Be(5);
        }
Пример #5
0
        public void CreateUIReportFromReport()
        {
            var uiReport = UIHealthCheckReport.CreateFrom(CreateHealthReport(HealthStatus.Healthy));

            Assert.NotNull(uiReport);
        }