Пример #1
0
        public void TestInitialize()
        {
            QueueList = new List<Queue>(new[] { new Queue("localhost", "queue"), new Queue("localhost", "test") });
            Messages = new List<MessageInfo>(new[] { new MessageInfo(), new MessageInfo() });

            QueueOperations = Substitute.For<IQueueOperations>();
            QueueOperations.GetQueues(Arg.Any<string>()).Returns(QueueList);
            QueueOperations.GetMessages(Arg.Any<Queue>()).Returns(Messages);

            QueueManager = new QueueManager(QueueOperations);
        }
 public void TestInitialize()
 {
     SourceQueueName = Guid.NewGuid().ToString("N");
     manager = new QueueManager();
     source = manager.CreatePrivateQueue(new Queue(new Address(Environment.MachineName, SourceQueueName)));
     destination = manager.CreatePrivateQueue(new Queue(new Address(Environment.MachineName, QueueName)));
     nonTransactional = manager.CreatePrivateQueue(new Queue(new Address("Nontransactional")), transactional: false);
 }