Esempio n. 1
0
        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);
        }
Esempio n. 2
0
    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));
    }
Esempio n. 3
0
        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));
        }