Exemple #1
0
        public void Get_and_reset_sets_the_value_to_zero()
        {
            var gauge = new MinGauge(MonitorConfig.Build("Test"));

            gauge.Set(100L);

            gauge.GetValueAndReset();

            gauge.GetValue().Should().Be(0L);
        }
Exemple #2
0
        public void Supplying_value_greater_than_previously_record_does_not_update_the_value()
        {
            const long minimumValue = 500;
            const long maximumValue = 1000;
            var        gauge        = new MinGauge(MonitorConfig.Build("Test"));

            gauge.Set(minimumValue);

            gauge.Set(maximumValue);

            gauge.GetValue().Should().Be(minimumValue);
        }
Exemple #3
0
        public void Initial_value_is_zero()
        {
            var gauge = new MinGauge(MonitorConfig.Build("Test"));

            gauge.GetValue().Should().Be(0);
        }