Exemple #1
0
        public void VerifyHeartBeatCanBeAdded()
        {
            IHeartBeatRepository hbr = new HeartBeatRepository();

            hbr.AddHeartBeat("TestGroup", "TestDevice", "TestService", "OK");
            IEnumerable <HeartBeatInfo> beats = hbr.GetHeartBeats();

            Assert.Equal(1, beats.Count());
        }
Exemple #2
0
        public void VerifyPurge()
        {
            IHeartBeatRepository hbr = new HeartBeatRepository();

            hbr.AddHeartBeat("TestGroup", "TestDevice", "TestService", "OK");
            IEnumerable <HeartBeatInfo> beats = hbr.GetHeartBeats();

            Assert.Equal(1, beats.Count());
            hbr.Timeout = 0;    // Should cause all to be purged
            beats       = hbr.GetHeartBeats();
            Assert.Equal(0, beats.Count());
        }
Exemple #3
0
        public void VerifyRepositoryCanBeCreated()
        {
            IHeartBeatRepository hbr = new HeartBeatRepository();

            Assert.NotNull(hbr);
        }