예제 #1
0
        public void InitTest()
        {
            var wasActed = false;

            source.NewQuoteAvailable += quote =>
            {
                wasActed = true;
            };
            source.Start();
            Thread.Sleep(50);
            Assert.IsTrue(wasActed);
        }
예제 #2
0
 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);
 }
예제 #3
0
        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);
        }