예제 #1
0
        public void Incrementing_the_counters_works_as_expected(int amount)
        {
            var counter = new CumulativeCounter(MonitorConfig.Build("Test"));

            counter.Increment(amount);

            counter.GetValues().First().Value.Should().Be(amount);
        }
예제 #2
0
        public void Get_and_reset_returns_the_value(int amount)
        {
            var counter = new CumulativeCounter(MonitorConfig.Build("Test"));

            counter.Increment(amount);

            var value = counter.GetValuesAndReset();

            value.First().Value.Should().Be(amount);
        }
예제 #3
0
        public void Initial_value_is_zero()
        {
            var counter = new CumulativeCounter(MonitorConfig.Build("Test"));

            counter.GetValues().First().Value.Should().Be(0);
        }
예제 #4
0
        public void Value_is_called_value()
        {
            var counter = new CumulativeCounter(MonitorConfig.Build("Test"));

            counter.GetValues().Single().Name.Should().Be("value");
        }
예제 #5
0
 protected override void UpdateMetric(CumulativeCounter metric) => metric.Increment();