private static void ReceiveHelloWorld(string messageQueueObjectName, MessageQueueTemplate q, int index)
        {
            object o = null;

            if (messageQueueObjectName == null)
            {
                o = q.ReceiveAndConvert();
            }
            else
            {
                o = q.ReceiveAndConvert(messageQueueObjectName);
            }
            Assert.IsNotNull(o);
            string data = o as string;

            Assert.IsNotNull(data);
            Assert.AreEqual("Hello World " + index, data);
        }
        public void GetAllFromQueue()
        {
            MessageQueueTemplate q = applicationContext["queue"] as MessageQueueTemplate;

            Assert.IsNotNull(q);
            for (int i = 0; i < 5; i++)
            {
                Console.WriteLine(q.ReceiveAndConvert());
            }
        }
 private static void ReceiveHelloWorld(string messageQueueObjectName, MessageQueueTemplate q, int index)
 {
     object o = null;
     if (messageQueueObjectName == null)
     {
         o = q.ReceiveAndConvert();
     } else
     {
         o = q.ReceiveAndConvert(messageQueueObjectName);
     }
     Assert.IsNotNull(o);
     string data = o as string;
     Assert.IsNotNull(data);
     Assert.AreEqual("Hello World " + index, data);
 }