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

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


    @Test
    public void subscriptionsDetailsMayBeFetched() throws Exception {
        // Arrange
        String topicName = "TestSubscriptionsDetailsMayBeFetched";
        service.createTopic(new TopicInfo(topicName));
        service.createSubscription(topicName, new SubscriptionInfo(
                "MySubscription3"));

        // Act
        SubscriptionInfo result = service.getSubscription(topicName,
                "MySubscription3").getValue();

        // Assert
        assertNotNull(result);
        assertEquals("MySubscription3", result.getName());
    }
View Full Code Here


    @Test
    public void subscriptionsMayBeDeleted() throws Exception {
        // Arrange
        String topicName = "TestSubscriptionsMayBeDeleted";
        service.createTopic(new TopicInfo(topicName));
        service.createSubscription(topicName, new SubscriptionInfo(
                "MySubscription4"));
        service.createSubscription(topicName, new SubscriptionInfo(
                "MySubscription5"));

        // Act
        service.deleteSubscription(topicName, "MySubscription4");
View Full Code Here

    @Test
    public void subscriptionWillReceiveMessage() throws Exception {
        // Arrange
        String topicName = "TestSubscriptionWillReceiveMessage";
        service.createTopic(new TopicInfo(topicName));
        service.createSubscription(topicName, new SubscriptionInfo("sub"));
        service.sendTopicMessage(topicName, new BrokeredMessage(
                "<p>Testing subscription</p>").setContentType("text/html"));

        // Act
        BrokeredMessage message = service.receiveSubscriptionMessage(topicName,
View Full Code Here

    @Test
    public void subscriptionCanBeUpdated() throws Exception {
        // Arrange
        String topicName = "testSubscriptionCanBeUpdated";
        service.createTopic(new TopicInfo(topicName));
        SubscriptionInfo originalSubscription = service.createSubscription(
                topicName, new SubscriptionInfo("sub")).getValue();
        Integer expectedMaxDeliveryCount = 1024;

        // Act
        SubscriptionInfo updatedSubscription = service.updateSubscription(
                topicName, originalSubscription
                        .setMaxDeliveryCount(expectedMaxDeliveryCount));

        // Assert
        assertEquals(expectedMaxDeliveryCount,
                updatedSubscription.getMaxDeliveryCount());
    }
View Full Code Here

    @Test
    public void rulesCanBeCreatedOnSubscriptions() throws Exception {
        // Arrange
        String topicName = "TestrulesCanBeCreatedOnSubscriptions";
        service.createTopic(new TopicInfo(topicName));
        service.createSubscription(topicName, new SubscriptionInfo("sub"));

        // Act
        RuleInfo created = service.createRule(topicName, "sub",
                new RuleInfo("MyRule1")).getValue();
View Full Code Here

    @Test
    public void rulesCanBeListedAndDefaultRuleIsPrecreated() throws Exception {
        // Arrange
        String topicName = "TestrulesCanBeListedAndDefaultRuleIsPrecreated";
        service.createTopic(new TopicInfo(topicName));
        service.createSubscription(topicName, new SubscriptionInfo("sub"));
        service.createRule(topicName, "sub", new RuleInfo("MyRule2"));

        // Act
        ListRulesResult result = service.listRules(topicName, "sub");
View Full Code Here

    @Test
    public void ruleDetailsMayBeFetched() throws Exception {
        // Arrange
        String topicName = "TestruleDetailsMayBeFetched";
        service.createTopic(new TopicInfo(topicName));
        service.createSubscription(topicName, new SubscriptionInfo("sub"));

        // Act
        RuleInfo result = service.getRule(topicName, "sub", "$Default")
                .getValue();
View Full Code Here

    @Test
    public void rulesMayBeDeleted() throws Exception {
        // Arrange
        String topicName = "TestRulesMayBeDeleted";
        service.createTopic(new TopicInfo(topicName));
        service.createSubscription(topicName, new SubscriptionInfo("sub"));
        service.createRule(topicName, "sub", new RuleInfo("MyRule4"));
        service.createRule(topicName, "sub", new RuleInfo("MyRule5"));

        // Act
        service.deleteRule(topicName, "sub", "MyRule5");
View Full Code Here

    @Test
    public void rulesMayHaveActionAndFilter() throws ServiceException {
        // Arrange
        String topicName = "TestRulesMayHaveAnActionAndFilter";
        service.createTopic(new TopicInfo(topicName));
        service.createSubscription(topicName, new SubscriptionInfo("sub"));

        // Act
        RuleInfo ruleOne = service.createRule(topicName, "sub",
                new RuleInfo("One").withCorrelationIdFilter("my-id"))
                .getValue();
View Full Code Here

TOP

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

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.