Ejemplo n.º 1
0
        public void should_add_class_tags_to_registered_metric()
        {
            var annottated           = new Annottated();
            ICompositeMetric metrics = AppMetrics.RegisterObject(annottated);

            Assert.That(HasTag(metrics.Config.Tags, "global-tag-name"), Is.True);
        }
Ejemplo n.º 2
0
        public void should_register_metric_fields()
        {
            var annottated           = new Annottated();
            ICompositeMetric metrics = AppMetrics.RegisterObject(annottated);

            Assert.That(metrics.Metrics.Count, Is.EqualTo(1));
        }
Ejemplo n.º 3
0
        public void should_add_field_tags_to_regitered_metrics()
        {
            var annottated           = new Annottated();
            ICompositeMetric metrics = AppMetrics.RegisterObject(annottated);

            IMetric timer = metrics.Metrics.First();

            Assert.That(HasTag(timer.Config.Tags, "my-tag-name"), Is.True);
            Assert.That(HasTag(timer.Config.Tags, "my-second-tag-name"), Is.True);
        }
Ejemplo n.º 4
0
        public void should_not_allow_uninitialized_fields()
        {
            var annottated = new Annottated(false);

            Assert.Catch(() => AppMetrics.RegisterObject(annottated));
        }