public void TestListAddressesByNetwork() { IComputeProvider provider = Bootstrapper.CreateComputeProvider(); INetworksProvider networksProvider = Bootstrapper.CreateNetworksProvider(); IEnumerable <CloudNetwork> networks = networksProvider.ListNetworks(); bool foundAddress = false; foreach (CloudNetwork network in networks) { Console.WriteLine("Network: {0}", network.Label); IEnumerable <IPAddress> addresses = provider.ListAddressesByNetwork(_server.Id, network.Label); bool foundAddressOnNetwork = false; foreach (IPAddress address in addresses) { foundAddress = true; foundAddressOnNetwork = true; Console.WriteLine(" {0}", address); } if (!foundAddressOnNetwork) { Console.WriteLine(" Server is not attached to this network."); } } if (!foundAddress) { Assert.Inconclusive("Couldn't find addresses on any network for the server."); } }