Package com.microsoft.windowsazure.services.queue.models

Examples of com.microsoft.windowsazure.services.queue.models.PeekMessagesResult$QueueMessage


        // Act
        service.createMessage(TEST_QUEUE_FOR_MESSAGES_4, "message1");
        service.createMessage(TEST_QUEUE_FOR_MESSAGES_4, "message2");
        service.createMessage(TEST_QUEUE_FOR_MESSAGES_4, "message3");
        service.createMessage(TEST_QUEUE_FOR_MESSAGES_4, "message4");
        PeekMessagesResult result = service
                .peekMessages(TEST_QUEUE_FOR_MESSAGES_4);

        // Assert
        assertNotNull(result);
        assertEquals(1, result.getQueueMessages().size());

        com.microsoft.windowsazure.services.queue.models.PeekMessagesResult.QueueMessage entry = result
                .getQueueMessages().get(0);

        assertNotNull(entry.getMessageId());
        assertNotNull(entry.getMessageText());
        assertEquals(0, entry.getDequeueCount());
View Full Code Here


        // Act
        service.createMessage(TEST_QUEUE_FOR_MESSAGES_5, "message1");
        service.createMessage(TEST_QUEUE_FOR_MESSAGES_5, "message2");
        service.createMessage(TEST_QUEUE_FOR_MESSAGES_5, "message3");
        service.createMessage(TEST_QUEUE_FOR_MESSAGES_5, "message4");
        PeekMessagesResult result = service.peekMessages(
                TEST_QUEUE_FOR_MESSAGES_5,
                new PeekMessagesOptions().setNumberOfMessages(4));

        // Assert
        assertNotNull(result);
        assertEquals(4, result.getQueueMessages().size());
        for (int i = 0; i < 4; i++) {
            com.microsoft.windowsazure.services.queue.models.PeekMessagesResult.QueueMessage entry = result
                    .getQueueMessages().get(i);

            assertNotNull(entry.getMessageId());
            assertNotNull(entry.getMessageText());
            assertEquals(0, entry.getDequeueCount());
View Full Code Here

        service.createMessage(TEST_QUEUE_FOR_MESSAGES_6, "message2");
        service.createMessage(TEST_QUEUE_FOR_MESSAGES_6, "message3");
        service.createMessage(TEST_QUEUE_FOR_MESSAGES_6, "message4");
        service.clearMessages(TEST_QUEUE_FOR_MESSAGES_6);

        PeekMessagesResult result = service
                .peekMessages(TEST_QUEUE_FOR_MESSAGES_6);

        // Assert
        assertNotNull(result);
        assertEquals(0, result.getQueueMessages().size());
    }
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.services.queue.models.PeekMessagesResult$QueueMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.