public void Reset_sets_the_value_to_zero() { var gauge = new MaxGauge(MonitorConfig.Build("Test")); gauge.Set(100L); gauge.Reset(); gauge.GetValues().First().Value.Should().Be(0L); }
public void should_reset_the_gauge() { var max = new MaxGauge(new MetricConfig("max2")); max.Update(42L); Measure measure = Testing.Sync<Measure>(max, max.GetMeasure, max.context_); Assert.That(measure.Value, Is.EqualTo(42L)); max.Reset(); max.Update(40L); measure = Testing.Sync<Measure>(max, max.GetMeasure, max.context_); Assert.That(measure.Value, Is.EqualTo(40d)); }
public void should_reset_the_gauge() { var max = new MaxGauge(new MetricConfig("max2")); max.Update(42L); Measure measure = Testing.Sync <Measure>(max, max.GetMeasure, max.context_); Assert.That(measure.Value, Is.EqualTo(42L)); max.Reset(); max.Update(40L); measure = Testing.Sync <Measure>(max, max.GetMeasure, max.context_); Assert.That(measure.Value, Is.EqualTo(40d)); }