Package com.microsoft.windowsazure.services.servicebus.models

Examples of com.microsoft.windowsazure.services.servicebus.models.TopicInfo


            throws Exception {
        // Arrange
        String sourceQueueName = "TestReceiveUpdatedQueueForwardToTopicMessageSuccessSource";
        String destinationTopicName = "TestReceiveUpdatedQueueForwardToTopicMessageSuccessDestination";
        String destinationSubscriptionName = "TestReceiveUpdatedQueueForwardToTopicMessageSuccessDestination";
        TopicInfo destinationTopicInfo = service.createTopic(
                new TopicInfo(destinationTopicName)).getValue();
        QueueInfo sourceQueueInfo = new QueueInfo(sourceQueueName);
        service.createQueue(sourceQueueInfo).getValue();
        service.updateQueue(sourceQueueInfo.setForwardTo(destinationTopicInfo
                .getUri().toString()));

        // Act
        service.sendQueueMessage(sourceQueueName, new BrokeredMessage(
                "Hello source queue!"));
View Full Code Here


        // Arrange
        String sourceTopicName = "TestReceiveSubForwardToTopMessageSuccessSrc";
        String sourceSubscriptionName = "TestReceiveSubForwardToTopMessageSuccessSrc";
        String destinationTopicName = "TestReceiveSubForwardToTopMessageSuccessDest";
        String destinationSubscriptionName = "TestReceiveSubForwardToTopMessageSuccessDest";
        service.createTopic(new TopicInfo(sourceTopicName)).getValue();
        TopicInfo destinationTopicInfo = service.createTopic(
                new TopicInfo(destinationTopicName)).getValue();
        service.createSubscription(destinationTopicName,
                new SubscriptionInfo(destinationSubscriptionName)).getValue();
        service.createSubscription(sourceTopicName, new SubscriptionInfo(
                sourceSubscriptionName).setForwardTo(destinationTopicInfo
                .getUri().toString()));

        // Act
        service.sendTopicMessage(sourceTopicName, new BrokeredMessage(
                "Hello source queue!"));
View Full Code Here

        // Arrange
        String sourceTopicName = "TestReceiveSubForwardToTopMessageSuccessSrc";
        String sourceSubscriptionName = "TestReceiveSubForwardToTopMessageSuccessSrc";
        String destinationTopicName = "TestReceiveSubForwardToTopMessageSuccessDest";
        String destinationSubscriptionName = "TestReceiveSubForwardToTopMessageSuccessDest";
        service.createTopic(new TopicInfo(sourceTopicName)).getValue();
        TopicInfo destinationTopicInfo = service.createTopic(
                new TopicInfo(destinationTopicName)).getValue();
        service.createSubscription(destinationTopicName,
                new SubscriptionInfo(destinationSubscriptionName)).getValue();
        SubscriptionInfo sourceSubscriptionInfo = service.createSubscription(
                sourceTopicName, new SubscriptionInfo(sourceSubscriptionName))
                .getValue();
        service.updateSubscription(sourceTopicName, sourceSubscriptionInfo
                .setForwardTo(destinationTopicInfo.getUri().toString()));
        Thread.sleep(1000);

        // Act
        service.sendTopicMessage(sourceTopicName, new BrokeredMessage(
                "Hello source queue!"));
View Full Code Here

            throws ServiceException {
        // Arrange
        String topicName = "TestTopicCanBeCreatedListedFetchedAndDeleted";

        // Act
        TopicInfo created = service.createTopic(
                new TopicInfo().setPath(topicName)).getValue();
        ListTopicsResult listed = service.listTopics();
        TopicInfo fetched = service.getTopic(topicName).getValue();
        service.deleteTopic(topicName);
        ListTopicsResult listed2 = service.listTopics();

        // Assert
        assertNotNull(created);
View Full Code Here

    public void listTopicsUnderASpecificPath() throws ServiceException {
        // Arrange
        String topicName = "testPathA/testPathB/listTopicUnderASpecificPath";

        // Act
        TopicInfo topicInfo = service.createTopic(
                new TopicInfo().setPath(topicName)).getValue();
        ListTopicsResult listTopicResult = service
                .listTopics(new ListTopicsOptions()
                        .setFilter("startswith(path, 'testPathA/testPathB') eq true"));

        // Assert
View Full Code Here

    @Test
    public void listTopicsUpdatedInLastFiveMinutes() throws ServiceException {
        String topicName = "testListTopicUpdatedInLastFiveMinutes";

        // Act
        TopicInfo topicInfo = service.createTopic(
                new TopicInfo().setPath(topicName)).getValue();
        ListTopicsResult listTopicResult = service
                .listTopics(new ListTopicsOptions()
                        .setFilter("ModifiedAt gt '1/25/2012 3:41:41 PM'"));

        // Assert
View Full Code Here

    public void listTopicsAccessedSinceASpecificTime() throws ServiceException {
        removeTopics();
        String topicName = "testListTopicAccessedInLastFiveMinutes";

        // Act
        TopicInfo topicInfo = service.createTopic(
                new TopicInfo().setPath(topicName)).getValue();
        ListTopicsResult listTopicResult = service
                .listTopics(new ListTopicsOptions()
                        .setFilter("AccessedAt gt '1/25/2012 3:41:41 PM'"));

        // Assert
View Full Code Here

    public void listTopicsCreatedSinceASpecificTime() throws ServiceException {
        removeTopics();
        String topicName = "testListTopicCreatedInLastFiveMinutes";

        // Act
        TopicInfo topicInfo = service.createTopic(
                new TopicInfo().setPath(topicName)).getValue();
        ListTopicsResult listTopicResult = service
                .listTopics(new ListTopicsOptions()
                        .setFilter("CreatedAt gt '1/25/2012 3:41:41 PM'"));

        // Assert
View Full Code Here

    public void topicCreatedContainsMetadata() throws ServiceException {
        // Arrange
        String topicName = "TestTopicCreatedContainsMetadata";

        // Act
        TopicInfo createdTopicInfo = service.createTopic(
                new TopicInfo().setPath(topicName)).getValue();

        // Assert
        assertNotNull(createdTopicInfo);
        assertNotNull(createdTopicInfo.getAutoDeleteOnIdle());
        assertEquals(false, createdTopicInfo.isRequiresDuplicateDetection());
        assertEquals(false,
                createdTopicInfo.isFilteringMessageBeforePublishing());
        assertEquals(EntityStatus.ACTIVE, createdTopicInfo.getStatus());
        assertEquals(true, createdTopicInfo.isSupportOrdering());
        assertEquals(false, createdTopicInfo.isAnonymousAccessible());

    }
View Full Code Here

        // Arrange
        String topicName = "testTopicCanBeUpdated";
        Long expectedMaxSizeInMegabytes = 2048L;

        // Act
        TopicInfo createdTopicInfo = service
                .createTopic(
                        new TopicInfo().setPath(topicName)
                                .setMaxSizeInMegabytes(1024L)).getValue();
        TopicInfo updatedTopicInfo = service.updateTopic(createdTopicInfo
                .setMaxSizeInMegabytes(expectedMaxSizeInMegabytes));

        // Assert
        assertEquals(expectedMaxSizeInMegabytes,
                updatedTopicInfo.getMaxSizeInMegabytes());
    }
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.services.servicebus.models.TopicInfo

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.