public void VerifyHeartBeatCanBeAdded() { IHeartBeatRepository hbr = new HeartBeatRepository(); hbr.AddHeartBeat("TestGroup", "TestDevice", "TestService", "OK"); IEnumerable<HeartBeatInfo> beats = hbr.GetHeartBeats(); Assert.Equal(1, beats.Count()); }
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()); }