Exemplo n.º 1
0
        public void TestAggregationSucceeds()
        {
            var metric1 = new MetricData("Test/Metric1", "units", 2);
            var metric2 = new MetricData("Test/Metric2", "units", 3);

            metric1.AggregateWith(metric2);

            Assert.AreEqual("Component/Test/Metric1[units]", metric1.FullName);
            Assert.AreEqual(5, metric1.Value);
            Assert.AreEqual(2, metric1.Count);
            Assert.AreEqual(2, metric1.MinValue);
            Assert.AreEqual(3, metric1.MaxValue);
            Assert.AreEqual(13, metric1.SumOfSquares);
        }