public void TestVirtualInterfaces() { IComputeProvider provider = Bootstrapper.CreateComputeProvider(); INetworksProvider networksProvider = Bootstrapper.CreateNetworksProvider(); CloudNetwork publicNetwork = networksProvider.ListNetworks().Single(i => i.Label.Equals("public", StringComparison.OrdinalIgnoreCase)); VirtualInterface publicVirtualInterface = provider.CreateVirtualInterface(_server.Id, publicNetwork.Id); Assert.IsNotNull(publicVirtualInterface); Assert.IsFalse(string.IsNullOrEmpty(publicVirtualInterface.Id)); Assert.IsNotNull(publicVirtualInterface.MACAddress); IEnumerable <VirtualInterface> virtualInterfaces = provider.ListVirtualInterfaces(_server.Id); Assert.IsNotNull(virtualInterfaces); Assert.IsTrue(virtualInterfaces.Where(i => i.Id.Equals(publicVirtualInterface.Id, StringComparison.OrdinalIgnoreCase)).Any()); bool deleted; deleted = provider.DeleteVirtualInterface(_server.Id, publicVirtualInterface.Id); Assert.IsTrue(deleted); }