public void should_not_throw_an_exception_when_system_queues_are_orphaned()
        {
            IList <Queue> unorderedQueueList = new List <Queue>(new[] { new Queue("myqueue.subscriptions") });

            queueManager = Substitute.For <IQueueManagerAsync>();
            queueManager.GetQueues().ReturnsForAnyArgs(Task.FromResult(unorderedQueueList));
            explorer = new QueueExplorerViewModel(queueManager, eventAggregator, windowManagerEx, networkOperations);

            Should.NotThrow(() => explorer.RefreshData());
        }
        public void should_display_connected_server_when_loading_queue_from_the_connected_server()
        {
            var           anotherQueue = new Queue("SecondQueue");
            IList <Queue> queues       = new List <Queue> {
                queue, anotherQueue
            };

            queueManager.GetQueues(Arg.Any <string>()).Returns(Task.FromResult(queues));

            AsyncHelper.Run(() => explorer.ConnectToQueue(Environment.MachineName));
            AsyncHelper.Run(() => explorer.RefreshData());

            explorer.Items[0].ShouldBeTypeOf <QueueServerExplorerItem>();
            explorer.Items.Count.ShouldBe(1);
            explorer.MachineRoot.Children.Count.ShouldBe(2);
        }