예제 #1
0
        public void Reset_sets_the_value_to_zero()
        {
            var gauge = new MinGauge(MonitorConfig.Build("Test"));

            gauge.Set(-100L);

            gauge.Reset();

            gauge.GetValue().Should().Be(0L);
        }
예제 #2
0
    public void should_reset_the_gauge() {
      var min = new MinGauge(new MetricConfig("min2"));
      min.Update(42L);

      Measure measure = Testing.Sync<Measure>(min, min.GetMeasure, min.context_);
      Assert.That(measure.Value, Is.EqualTo(42L));

      min.Reset();
      min.Update(50L);
      measure = Testing.Sync<Measure>(min, min.GetMeasure, min.context_);
      Assert.That(measure.Value, Is.EqualTo(50D));
    }
예제 #3
0
        public void should_reset_the_gauge()
        {
            var min = new MinGauge(new MetricConfig("min2"));

            min.Update(42L);

            Measure measure = Testing.Sync <Measure>(min, min.GetMeasure, min.context_);

            Assert.That(measure.Value, Is.EqualTo(42L));

            min.Reset();
            min.Update(50L);
            measure = Testing.Sync <Measure>(min, min.GetMeasure, min.context_);
            Assert.That(measure.Value, Is.EqualTo(50D));
        }