Пример #1
0
        public void TestListPlans()
        {
            RunTest((client) => {
                var allPlans = client.Plans.ListAll();

                var resourceGroups = new System.Collections.Generic.HashSet <string>();
                allPlans.ForEach(client.Plans.ListAllNext, (plan) => {
                    resourceGroups.Add(Common.GetResourceGroupFromId(plan.Id));
                });

                resourceGroups.ForEach((rg) => {
                    client.Plans.List(rg);
                });
            });
        }
Пример #2
0
        public void TestListOffers()
        {
            RunTest((client) => {
                var allOffers      = client.Offers.ListAll();
                var resourceGroups = new System.Collections.Generic.HashSet <string>();

                allOffers.ForEach(client.Offers.ListAllNext, (offer) => {
                    resourceGroups.Add(Common.GetResourceGroupFromId(offer.Id));
                });

                resourceGroups.ForEach((rg) => {
                    var offers = client.Offers.List(rg);
                    offers.ForEach(client.Offers.ListNext, ValidateOffer);
                });
            });
        }
Пример #3
0
        public void TestGetAllOffers()
        {
            RunTest((client) => {
                var allOffers      = client.Offers.ListAll();
                var resourceGroups = new System.Collections.Generic.HashSet <string>();
                allOffers.ForEach(client.Offers.ListAllNext, (offer) => {
                    resourceGroups.Add(Common.GetResourceGroupFromId(offer.Id));
                });

                resourceGroups.ForEach((rg) => {
                    client.Offers.List(rg).ForEach(client.Offers.ListNext, (offer) => {
                        var result = client.Offers.Get(rg, offer.Name);
                        AssertSame(offer, result);
                    });
                });
            });
        }