Пример #1
0
        public void Polling_metrics_resets_monitor()
        {
            var counter = new PeakCounter(MonitorConfig.Build("Test"));

            _monitorRegistry.GetRegisteredMonitors().Returns(new[] { counter });
            counter.Increment();

            Thread.Sleep(1100);

            counter.GetValue().Should().Be(0);
        }
Пример #2
0
        public void Initial_peak_is_zero()
        {
            var value = counter.GetValue();

            value.Should().Be(0);
        }