public void ShouldNotGiveEventsInstantly()
        {
            using var plugin = new TestPlugin(Mock.Of <ISettingsProvider>());
            TestEventSource.TypedLogEvents
            .Where(e => e.GetType() != typeof(Commander))
            .Take(1000)
            .RandomSubset(50)
            .ForEach(e => plugin.OnNext(e));

            CollectionAssert.IsEmpty(plugin.Flushed);
        }
 public void ShouldFlushEventsAfterTimeout()
 {
     using var plugin = new TestPlugin(Mock.Of <ISettingsProvider>());
     foreach (var @event in TestEventSource.TypedLogEvents.Skip(10).Take(10))
     {
         plugin.OnNext(@event);
     }
     plugin.FlushQueue();
     CollectionAssert.IsNotEmpty(plugin.Flushed);
     Assert.AreEqual(10, plugin.Flushed.Count);
 }
 public void ShouldNotGiveEventsInstantly()
 {
     using (var plugin = new TestPlugin(Mock.Of <ISettingsProvider>()))
     {
         foreach (var @event in TestEventSource.TypedLogEvents.Skip(10).Take(10))
         {
             plugin.OnNext(@event);
         }
         CollectionAssert.IsEmpty(plugin.Flushed);
     }
 }