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); }
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); }
public void Initial_value_is_zero() { var gauge = new MinGauge(MonitorConfig.Build("Test")); gauge.GetValue().Should().Be(0); }