public void Sample01a_HelloWorld_Errors()
        {
            string      queueName = Randomize("sample-queue");
            QueueClient queue     = new QueueClient(ConnectionString, queueName);

            try
            {
                queue.Create();
                Sample01a_HelloWorld.Errors(ConnectionString, queueName);
            }
            finally
            {
                queue.Delete();
            }
        }
        public void Sample01a_HelloWorld_SendMessage()
        {
            string      queueName = Randomize("sample-queue");
            QueueClient queue     = new QueueClient(ConnectionString, queueName);

            try
            {
                Sample01a_HelloWorld.SendMessage(ConnectionString, queueName);

                // Verify we uploaded one message
                Assert.AreEqual(1, queue.PeekMessages().Value.Length);
            }
            finally
            {
                queue.Delete();
            }
        }
        public void Sample01a_HelloWorld_PeekMesssages()
        {
            string      queueName = Randomize("sample-queue");
            QueueClient queue     = new QueueClient(ConnectionString, queueName);

            try
            {
                queue.Create();
                Sample01a_HelloWorld.PeekMesssages(ConnectionString, queueName);

                // Verify we haven't emptied the queue
                Assert.Less(0, queue.PeekMessages().Value.Length);
            }
            finally
            {
                queue.Delete();
            }
        }
        public void Sample01a_HelloWorld_ReceiveMessages()
        {
            string      queueName = Randomize("sample-queue");
            QueueClient queue     = new QueueClient(ConnectionString, queueName);

            try
            {
                queue.Create();
                Sample01a_HelloWorld.ReceiveMessages(ConnectionString, queueName);

                // Verify we processed all the messages
                Assert.AreEqual(0, queue.PeekMessages().Value.Length);
            }
            finally
            {
                queue.Delete();
            }
        }