Beispiel #1
0
        public void VerifyLocal()
        {
            var ps = new DeploymentServer(Environment.MachineName);
            var ub = new UriBuilder("msmq", ps.Name) { Path = "dk_test" };
            var t = new CreateLocalMsmqQueueTask(ps, new QueueAddress(ub.Uri));
            var r = t.VerifyCanRun();

            Assert.IsFalse(r.ContainsError(), "Errors occured during MSMQ create verification.");
        }
Beispiel #2
0
        private static DeploymentResult CreateMsmq(string[] args)
        {
            var queuename = args[1];
            var queueAddress = new QueueAddress(queuename);
            var transactional = false;
            if (args.Length > 2)
                bool.TryParse(args[2], out transactional);

            var result = new CreateLocalMsmqQueueTask(_server, queueAddress, transactional).Execute();

            return result;
        }
Beispiel #3
0
        public void ExecuteLocal()
        {
            var ps = new DeploymentServer(Environment.MachineName);
            var ub = new UriBuilder("msmq", ps.Name) { Path = "dk_test2" };
            var address = new QueueAddress(ub.Uri);

            if (MessageQueue.Exists(address.LocalName))
                MessageQueue.Delete(address.LocalName);

            var t = new CreateLocalMsmqQueueTask(ps, address);
            var r = t.Execute();

            Assert.IsFalse(r.ContainsError(), "Errors occured during MSMQ create execution.");
        }
Beispiel #4
0
        public void ExecuteLocal()
        {
            var ps = new DeploymentServer(Environment.MachineName);
            var ub = new UriBuilder("msmq", ps.Name) { Path = "dk_test2" };
            var address = new QueueAddress(ub.Uri);

            if (MessageQueue.Exists(address.LocalName))
                MessageQueue.Delete(address.LocalName);

            var t = new CreateLocalMsmqQueueTask(ps, address, transactional:true);
            var r = t.Execute();

            Assert.IsFalse(r.ContainsError(), "Errors occured during MSMQ create execution.");

            var queue =
                MessageQueue.GetPrivateQueuesByMachine(Environment.MachineName).SingleOrDefault(
                    x => address.LocalName.EndsWith(x.QueueName));
            Assert.IsNotNull(queue, "Transactional queue was not created.");
            Assert.IsTrue(queue.Transactional, "Queue was created but is not transactional.");
        }