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); }
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); }