public void Updating_the_value_updates_the_value_correctly(double expectedValue) { var gauge = new DecimalGauge(MonitorConfig.Build("Test")); gauge.Set(new decimal(expectedValue)); gauge.GetValues().First().Value.Should().Be(new decimal(expectedValue)); }
public void Get_and_reset_gets_the_maximum_value() { const long expected = 100L; var gauge = new DecimalGauge(MonitorConfig.Build("Test")); gauge.Set(expected); gauge.GetValuesAndReset().First().Value.Should().Be(expected); }
public void Get_and_reset_sets_the_value_to_zero() { var gauge = new DecimalGauge(MonitorConfig.Build("Test")); gauge.Set(100L); gauge.GetValuesAndReset().ToList(); gauge.GetValues().First().Value.Should().Be(0L); }
public void Reset_sets_the_value_to_zero() { var gauge = new DecimalGauge(MonitorConfig.Build("Test")); gauge.Set(100m); gauge.Reset(); gauge.GetValue().Should().Be(0m); }