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

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


                        .path(subscriptionName).path("rules")).get(Feed.class);
        ArrayList<RuleInfo> list = new ArrayList<RuleInfo>();
        for (Entry entry : feed.getEntries()) {
            list.add(new RuleInfo(entry));
        }
        ListRulesResult result = new ListRulesResult();
        result.setItems(list);
        return result;
    }
View Full Code Here


        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");

        // Assert
        assertNotNull(result);
        assertEquals(2, result.getItems().size());
        RuleInfo rule0 = result.getItems().get(0);
        RuleInfo rule1 = result.getItems().get(1);
        if (rule0.getName() == "MyRule2") {
            RuleInfo swap = rule1;
            rule1 = rule0;
            rule0 = swap;
        }

        assertEquals("$Default", rule0.getName());
        assertEquals("MyRule2", rule1.getName());
        assertNotNull(result.getItems().get(0).getModel());
    }
View Full Code Here

        // Act
        service.deleteRule(topicName, "sub", "MyRule5");
        service.deleteRule(topicName, "sub", "$Default");

        // Assert
        ListRulesResult result = service.listRules(topicName, "sub");
        assertNotNull(result);
        assertEquals(1, result.getItems().size());
        assertEquals("MyRule4", result.getItems().get(0).getName());
    }
View Full Code Here

TOP

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

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.