public void lucene_statistics_should_retrieve_values() { LuceneStatistics luceneStatistics = new LuceneStatistics(LuceneSearcherConfiguration); luceneStatistics.AllExceptionCount.Should().BeGreaterThan(0); luceneStatistics.AllLogCount.Should().BeGreaterThan(0); luceneStatistics.AppNameCount.Should().NotBe(-1); luceneStatistics.GetAppNames.Count().Should().BeGreaterThan(0); luceneStatistics.LogInAppNameCount("badappaname").Should().BeLessThan(0); luceneStatistics.LogInAppNameCount("badappaname").Should().Be(-1); luceneStatistics.ExceptionInAppNameCount("badappaname").Should().BeLessThan(0); luceneStatistics.ExceptionInAppNameCount("badappaname").Should().Be(-1); }
public LuceneStatisticsService(IOptions <LuceneConfiguration> configuration) { _stats = new LuceneStatistics(configuration.Value); }