Exemplo n.º 1
0
        public void TestReceive()
        {
            IMessageQueueObject messageQueueObject = MessageQueueManagement.GetMessageQueueInstance("MSMQ_Messages");

            if (messageQueueObject.Enabled)
            {
                IMessageObject message = messageQueueObject.Receive();
            }
        }
Exemplo n.º 2
0
        public void TestSend()
        {
            IMessageQueueObject messageQueueObject = MessageQueueManagement.GetMessageQueueInstance("MSMQ_Messages");

            if (messageQueueObject.Enabled)
            {
                MessageObject message = new MessageObject();

                message.Value = "测试";

                // Expect.Once.On(mockMessageObject).GetProperty("Id").Will(Return.Value("00000000-0000-0000-0000-000000000001"));

                messageQueueObject.Send(message);
            }
        }