Esempio n. 1
0
        public void PurgeQueueTest()
        {
            QueueMessageBatchTest ();
            AWSSQSHelper queueTestAWSSQS = new AWSSQSHelper (queueName, 10, regionEndPoint, myAccessKey, mySecretKey);

            queueTestAWSSQS.PurgeQueue ();
        }
Esempio n. 2
0
        public void GetQueueMessagesBatchTest()
        {
            AWSSQSHelper queueTestAWSSQS = new AWSSQSHelper (queueName, 10, regionEndPoint, myAccessKey, mySecretKey);
            // Requesting messages
            queueTestAWSSQS.DeQueueMessages ();

            // Asserting they are the right ones
            int tamp = 1;
            foreach (var msg in queueTestAWSSQS.GetMessages ())
            {
                string msgbody = "This is message number " + tamp + " ! ";
                Assert.True (msg.Equals (msgbody));
                tamp += 1;
                //Deleting messages
                queueTestAWSSQS.DeleteMessage (msg);
            }
        }
Esempio n. 3
0
        public void QueueMessageBatchTest()
        {
            // Creating my messages list
            IList<string> messages = new List<string> ();

            for (int ind = 1; ind <= 10; ind++)
            {
                string body = "This is message number " + ind + " ! ";
                messages.Add (body);
            }

            // Accessing the queue
            AWSSQSHelper queueTestAWSSQS = new AWSSQSHelper (queueName, 10, regionEndPoint, myAccessKey, mySecretKey);

            // Adding messages
            Assert.True (queueTestAWSSQS.EnqueueMessages (messages));
        }
Esempio n. 4
0
        public void QueueMessageTest()
        {
            String msgbody = "First test To Queue";

            // Accessing the Queue
            AWSSQSHelper queueTestAWSSQS = new AWSSQSHelper (queueName, 2, regionEndPoint, myAccessKey, mySecretKey);

            // Adding msgs
            Assert.True (queueTestAWSSQS.EnqueueMessage (msgbody));

            // Request messages
            queueTestAWSSQS.DeQueueMessages ();

            // Have i receved any ?
            Assert.True (queueTestAWSSQS.AnyMessageReceived ());

            // Asserting they are the right one
            foreach (var msg in queueTestAWSSQS.GetMessages ())
            {
                Assert.True (msg.Equals (msgbody));
                queueTestAWSSQS.DeleteMessage (msg);
            }
        }