public void InitAndStartDequeueing()
 {
     DequeueStrategy.Init(Address,
                          null,
                          m =>
     {
         _receivedMessages.OnNext(m);
         return(true);
     },
                          (m, e) =>
     {
         if (e != null)
         {
             _exceptionsThrownByReceiver.OnNext(e);
         }
     });
     DequeueStrategy.Start(1);
 }
 public void SendAndReceiveSetUp()
 {
     dequeueStrategy = new DequeueStrategy(new DefaultConnectionManager(ConnectionConfiguration));
     Event           = new ManualResetEventSlim();
     dequeueStrategy.Init(ReceiverAddress, TransactionSettings.Default,
                          x =>
     {
         Assert.AreEqual(SenderAddress, x.ReplyToAddress);
         Assert.AreEqual("correlation", x.CorrelationId);
         x.Body.ParseJson <int>();
         if (Interlocked.Increment(ref Count) == targetCount)
         {
             Event.Set();
         }
         return(true);
     },
                          (m, e) =>
     {
     });
     dequeueStrategy.Start(1);
 }