public void Send_data_when_registered(int someValue) { var timer = new TimerAbsentFilter(new Timer(MonitorConfig.Build("Test"))); timer.Register(TimeSpan.FromSeconds(someValue)); timer.GetValues().Any().Should().BeTrue(); }
public void Do_not_send_data_when_nothing_registered_after_GetValues() { var timer = new TimerAbsentFilter(new Timer(MonitorConfig.Build("Test"))); timer.Register(TimeSpan.FromSeconds(1)); timer.GetValues(); timer.GetValues().ShouldBeEquivalentTo(new IMeasurement[0]); ((ITimer)timer).GetValues().ShouldBeEquivalentTo(new IMeasurement[0]); }