コード例 #1
0
        protected void TestExceptionHandlingWith(IBasicConsumer consumer, FailingOp fn)
        {
            Object o        = new Object();
            bool   notified = false;
            string q        = Model.QueueDeclare();


            Model.CallbackException += (m, evt) => {
                notified = true;
                Monitor.PulseAll(o);
            };

            string tag = Model.BasicConsume(q, true, consumer);

            fn(Model, q, consumer, tag);
            WaitOn(o);

            Assert.IsTrue(notified);
        }
コード例 #2
0
        protected void TestExceptionHandlingWith(IBasicConsumer consumer, FailingOp fn)
        {
            Object o = new Object();
            bool notified = false;
            string q = Model.QueueDeclare();


            Model.CallbackException += (m, evt) => {
                notified = true;
                Monitor.PulseAll(o);
            };

            string tag = Model.BasicConsume(q, true, consumer);
            fn(Model, q, consumer, tag);
            WaitOn(o);

            Assert.IsTrue(notified);
        }