Exemplo n.º 1
0
        public void TestGetServiceHealth_ReturnsApplicationHealthInfo()
        {
            var expected = new ApplicationHealthInfo()
            {
                Application = new ApplicationInfo()
                {
                    Name    = "Evaluations μSerrvice",
                    Id      = Guid.Parse("11111111-1111-1111-1111-111111111111"),
                    Version = "0.0.0"
                },
                Status = ApplicationHealthStatus.Up
            };

            var service = new HealthService(new AppInfoStubDao());
            var actual  = service.GetServiceHealth();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 2
0
        public void TestGetServiceHealth_ThrowsInternalErrorServiceException()
        {
            var service = new HealthService(new AppInfoErrorStubDao());

            Assert.Throws <InternalErrorServiceException>(() => service.GetServiceHealth());
        }