Example #1
0
        public void Updating_the_value_updates_the_value_correctly(double expectedValue)
        {
            var gauge = new DecimalGauge(MonitorConfig.Build("Test"));

            gauge.Set(new decimal(expectedValue));

            gauge.GetValue().Should().Be(new decimal(expectedValue));
        }
Example #2
0
        public void Get_and_reset_sets_the_value_to_zero()
        {
            var gauge = new DecimalGauge(MonitorConfig.Build("Test"));

            gauge.Set(100L);

            gauge.GetValueAndReset();

            gauge.GetValue().Should().Be(0L);
        }
Example #3
0
        public void Initial_value_is_zero()
        {
            var gauge = new DecimalGauge(MonitorConfig.Build("Test"));

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