Microsoft.Ccr.Core.DispatcherTest.UnhandledExceptionPort3 C# (CSharp) Method

UnhandledExceptionPort3() private method

private UnhandledExceptionPort3 ( ) : void
return void
        public void UnhandledExceptionPort3()
        {
            using (Dispatcher d = new Dispatcher ()) {
                var dq = new FaultyDispatcherQueue ("foo", d);
                var evt = new AutoResetEvent (false);

                int dispEx = 0;
                d.UnhandledException += delegate { ++dispEx; };

                dq.Enqueue (Arbiter.FromHandler (() => { throw new Exception (); }));
                Thread.Sleep (100);
                Assert.AreEqual (0, dispEx, "#1");
            }
        }