Beispiel #1
0
        public void SimpleAppendMetricNameToPath()
        {
            IMetricNameFormatter formatter = new AppendMetricNameToPathFormatter();

            Assert.AreEqual(null, formatter.Format(null, null));

            string name = "MetricName";

            Assert.AreEqual(name, formatter.Format(name, null));

            string[] path = { "domain", "app" };
            Assert.AreEqual("domain.app.MetricName", formatter.Format(name, path));
        }
Beispiel #2
0
        public void SeparatorAppendMetricNameToPath()
        {
            IMetricNameFormatter formatter = new AppendMetricNameToPathFormatter("-");
            string name = "MetricName";

            string[] path = { "domain", "app" };
            Assert.AreEqual("domain-app-MetricName", formatter.Format(name, path));
        }