Beispiel #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());
 }
Beispiel #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());
 }