예제 #1
0
        public void can_create_metric_reporter()
        {
            var provider = new GraphiteReporterProvider(new GraphiteReporterSettings(), new DefaultMetricsFilter());

            var reporter = provider.CreateMetricReporter("graphite", new LoggerFactory());

            reporter.Should().NotBeNull();
        }
예제 #2
0
        public void settings_are_required()
        {
            Action action = () =>
            {
                var provider = new GraphiteReporterProvider(null);
            };

            action.ShouldThrow <ArgumentNullException>();
        }
예제 #3
0
        public void filter_is_not_required()
        {
            Action action = () =>
            {
                var provider = new GraphiteReporterProvider(new GraphiteReporterSettings(), null);
                provider.Filter.Should().BeOfType <NoOpMetricsFilter>();
            };

            action.ShouldNotThrow();
        }
예제 #4
0
        public void defaults_filter_to_no_op()
        {
            var provider = new GraphiteReporterProvider(new GraphiteReporterSettings());

            provider.Filter.Should().BeOfType <NoOpMetricsFilter>();
        }