public void WillNotMoveMessagesBetweenMainQueues()
            {
                var alternateQueue = new MessageQueue(TestMessageQueue.Path + ".alternate", QueueAccessMode.SendAndReceive);
                var message        = new System.Messaging.Message("Message")
                {
                    Recoverable = true
                };

                try
                {
                    alternateQueue.EnsureQueueExists();

                    testQueue.Send(message);
                    testQueue.Move(testQueue.PeekById(message.Id), alternateQueue);
                }
                catch (Win32Exception ex)
                {
                    Assert.Equal("Unknown error (0xc00e0006)", ex.Message);
                }
                finally
                {
                    System.Messaging.MessageQueue.Delete(alternateQueue.Path);
                }
            }
 public WhenMovingMessages()
 {
     testQueue = TestMessageQueue.Create();
     testQueue.EnsureQueueExists();
     testQueue.Purge();
 }
 public void WillReturnFalseIfUnableToCreateQueue()
 {
     using (var queue = new MessageQueue(@"~invalid~\private$\~queue~", QueueAccessMode.SendAndReceive))
         Assert.False(queue.EnsureQueueExists());
 }