public void TestGetAllLoadBalancers()
        {
            RunTest((client) =>
            {
                var balancers = client.LoadBalancers.List();
                // This test should be using the SessionRecord which has an existing LoadBalancer created
                if (balancers != null)
                {
                    balancers.ForEach((loadBalancer) =>
                    {
                        //var retrieved = client.LoadBalancers.Get(loadBalancer.Name);
                        //AssertLoadBalancersAreSame(loadBalancer, retrieved);

                        NetworkCommon.ValidateBaseResources(loadBalancer);

                        ValidateBaseResourceTenant(loadBalancer);

                        Assert.NotNull(loadBalancer.PublicIpAddresses);
                        foreach (string IpAddress in loadBalancer.PublicIpAddresses)
                        {
                            Assert.NotNull(IpAddress);
                        }
                    });
                }
            });
        }
Ejemplo n.º 2
0
        public void TestGetAllVirtualNetworks()
        {
            RunTest((client) =>
            {
                var networks = client.VirtualNetworks.List();
                Common.MapOverIPage(networks, client.VirtualNetworks.ListNext, (network) =>
                {
                    NetworkCommon.ValidateBaseResources(network);

                    ValidateBaseResourceTenant(network);

                    ValidateConfigurationState(network.ConfigurationState);
                });
            });
        }
Ejemplo n.º 3
0
        public void TestGetAllVirtualNetworksOData()
        {
            RunTest((client) =>
            {
                Microsoft.Rest.Azure.OData.ODataQuery <VirtualNetwork> odataQuery = new Microsoft.Rest.Azure.OData.ODataQuery <VirtualNetwork>();
                odataQuery.Top = 10;

                var networks = client.VirtualNetworks.List(odataQuery);
                Common.MapOverIPage(networks, client.VirtualNetworks.ListNext, (network) =>
                {
                    NetworkCommon.ValidateBaseResources(network);

                    ValidateBaseResourceTenant(network);

                    ValidateConfigurationState(network.ConfigurationState);
                });
            });
        }
Ejemplo n.º 4
0
        public void TestGetAllPublicIpAddresses()
        {
            RunTest((client) =>
            {
                var addresses = client.PublicIPAddresses.List();

                // This test should be using the SessionRecord which has an existing PublicIPAddress created
                if (addresses != null)
                {
                    addresses.ForEach((address) =>
                    {
                        NetworkCommon.ValidateBaseResources(address);

                        ValidateBaseResourceTenant(address);

                        Assert.NotNull(address.IpAddress);
                        Assert.NotNull(address.IpPool);
                    });
                }
            });
        }
Ejemplo n.º 5
0
        public void TestGetAllPublicIpAddressesOData()
        {
            RunTest((client) =>
            {
                Microsoft.Rest.Azure.OData.ODataQuery <PublicIpAddress> odataQuery = new Microsoft.Rest.Azure.OData.ODataQuery <PublicIpAddress>();
                odataQuery.Top = 10;

                var addresses = client.PublicIPAddresses.List(odataQuery);

                // This test should be using the SessionRecord which has an existing PublicIPAddress created
                if (addresses != null)
                {
                    addresses.ForEach((address) =>
                    {
                        NetworkCommon.ValidateBaseResources(address);

                        ValidateBaseResourceTenant(address);

                        Assert.NotNull(address.IpAddress);
                        Assert.NotNull(address.IpPool);
                    });
                }
            });
        }