public void InitTest() { var wasActed = false; source.NewQuoteAvailable += quote => { wasActed = true; }; source.Start(); Thread.Sleep(50); Assert.IsTrue(wasActed); }
public void DisposingTest() { var wasActed = false; using (var quotesSource = new QuotesSource(1)) { quotesSource.NewQuoteAvailable += quote => { wasActed = true; }; quotesSource.Start(); } wasActed = false; Thread.Sleep(50); Assert.IsFalse(wasActed); }
public void DisposingTest() { var wasActed = false; using (var quotesSource = new QuotesSource(1)) { quotesSource.NewQuoteAvailable += quote => { wasActed = true; }; quotesSource.Start(); } wasActed = false; Thread.Sleep(50); Assert.IsFalse(wasActed); }