public void It_should_report_num_errors()
        {
            var statCollector = new InMemoryStatCollector();

            var stats = statCollector.GetStats();
            Assert.That(stats.NumErrors, Is.EqualTo(0));

            statCollector.IncrementErrors(2);
            statCollector.IncrementErrors(4);

            stats = statCollector.GetStats();
            Assert.That(stats.NumErrors, Is.EqualTo(6));
        }
        public void It_should_report_error_rate()
        {
            var statCollector = new InMemoryStatCollector();

            var stats = statCollector.GetStats();
            Assert.That(stats.ErrorRate, Is.EqualTo(0));

            statCollector.IncrementErrors(5);
            statCollector.IncrementRequestsHandled(15, TimeSpan.Zero);

            stats = statCollector.GetStats();
            Assert.That(stats.ErrorRate, Is.EqualTo(25m));
        }