Example #1
0
            public void adds_gauge_with_large_double_values()
            {
                var s = new Statsd(_udp, SampleEverything);

                s.SendGauge("gauge", 34563478564785, false);
                _udp.AssertWasCalled(x => x.Send("gauge:34563478564785.000000000000000|g"));
            }
Example #2
0
            //because it is looped through to original Gauge send function
            public void adds_gauge_with_deltaValue_formatsCorrectly(bool isDeltaValue, double value,
                                                                    string expectedFormattedStatsdMessage)
            {
                var s = new Statsd(_udp, SampleEverything);

                s.SendGauge("delta-gauge", value, isDeltaValue);
                _udp.AssertWasCalled(x => x.Send(expectedFormattedStatsdMessage));
            }
Example #3
0
            public void gauge_exception_fails_silently()
            {
                _udp.Stub(x => x.Send(Arg <string> .Is.Anything)).Throw(new Exception());
                var s = new Statsd(_udp);

                s.SendGauge("gauge", 5.0, false);
                Assert.Pass();
            }