public void should_request_the_queue_to_be_created_when_dialog_is_closed() { const string queueName = "TestQueue"; var parent = new TestConductorScreen(); var addedQueue = new Queue(Environment.MachineName, queueName); QueueManager.CreatePrivateQueue(Arg.Any <Queue>(), true).ReturnsForAnyArgs(addedQueue); Model.Parent = parent; Model.SelectedMachine = Environment.MachineName; Model.QueueName = queueName; Model.IsTransactional = true; Model.Accept(); QueueManager.Received().CreatePrivateQueue(Arg.Is <Queue>(q => q.Address.Equals("testqueue@.")), Arg.Is(true)); Model.IsActive.ShouldBe(false); }
private bool CreateQueue() { var queue = _queueManager.CreatePrivateQueue(new Queue(SelectedMachine, QueueName), IsTransactional); return(queue != null); }