Beispiel #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);
        }
Beispiel #2
0
        public void Incrementing_value_updates_peak(int amount)
        {
            counter.Increment(amount);

            counter.GetValue().Should().Be(amount);
        }