Exemplo n.º 1
0
        public static void ArgumentNullExceptions()
        {
            Assert.Throws <ArgumentNullException>(() => new Async(null as Loop));
            Assert.Throws <ArgumentNullException>(() => new AsyncWatcher <int>(null as Loop));

            var async        = new Async();
            var asyncWatcher = new AsyncWatcher <int>();

            Assert.Throws <ArgumentNullException>(() => asyncWatcher.Send(null as IEnumerable <int>));

            async.Close();
            asyncWatcher.Close();
        }
Exemplo n.º 2
0
        public void ArgumentNullExceptions()
        {
            Assert.Throws<ArgumentNullException>(() => new Async(null as Loop));
            Assert.Throws<ArgumentNullException>(() => new AsyncWatcher<int>(null as Loop));

            var async = new Async();
            var asyncWatcher = new AsyncWatcher<int>();

            Assert.Throws<ArgumentNullException>(() => asyncWatcher.Send(null as IEnumerable<int>));

            async.Close();
            asyncWatcher.Close ();
        }
 public void Close()
 {
     watcher.Close();
 }