public void TestAddEntry1()
        {
            var settings = new EventsLogAnalyserConfiguration
            {
                Events =
                {
                    new EventConfiguration {
                        FilterExpression = @"Found (\d+) things"
                    }
                }
            };

            using (var analyser = new EventsLogAnalyser(_scheduler,
                                                        _source,
                                                        TimeSpan.Zero,
                                                        settings
                                                        ))
            {
                _scheduler.RunOnce();
                analyser.Events.Count.Should().Be(0);

                _source.AddEntry("Found 42 things", LevelFlags.None);
                _scheduler.RunOnce();
                analyser.Events.Count.Should().Be(1);
                var actualEntry = analyser.Events[0].Result;
                actualEntry.Should().Be(new LogEntry(null, "42"));
            }
        }
 public void TestConstruction1()
 {
     using (var analyser = new EventsLogAnalyser(_scheduler,
                                                 _source,
                                                 TimeSpan.Zero,
                                                 new EventsLogAnalyserConfiguration()
                                                 ))
     {
         analyser.Events.Should().NotBeNull();
         analyser.Events.Count.Should().Be(0);
         analyser.AnalysisTime.Should().BeGreaterOrEqualTo(TimeSpan.Zero);
         analyser.UnexpectedExceptions.Should().NotBeNull();
         analyser.UnexpectedExceptions.Should().BeEmpty();
     }
 }
        public void TestOneEntry2()
        {
            var settings = new EventsLogAnalyserConfiguration
            {
                Events =
                {
                    new EventConfiguration {
                        FilterExpression = @"Found (\d+) thing(s)"
                    }
                }
            };

            _source.AddEntry("Found tmp things", LevelFlags.None);

            using (var analyser = new EventsLogAnalyser(_scheduler,
                                                        _source,
                                                        TimeSpan.Zero,
                                                        settings
                                                        ))
            {
                _scheduler.RunOnce();
                analyser.Events.Count.Should().Be(0);
            }
        }