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