public void EventLoop_Pend() { var wait = new AutoResetEvent(false); EventLoop.Start(); EventLoop.Pend(() => { wait.Set(); }); if (!wait.WaitOne(100)) { Assert.Fail("Event did not fire correctly."); } }