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);
        }
        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);
        }
        public void Initial_value_is_zero()
        {
            var counter = new CumulativeCounter(MonitorConfig.Build("Test"));

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

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