示例#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());
 }
示例#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());
 }
示例#3
0
 public void VerifyRepositoryCanBeCreated()
 {
     IHeartBeatRepository hbr = new HeartBeatRepository();
     Assert.NotNull(hbr);
 }