public async Task CreateFloatingIpWithEmptyNetworkIdThrows() { var client = new NetworkServiceClient(GetValidCreds(), "Neutron", CancellationToken.None, this.ServiceLocator); await client.CreateFloatingIp(string.Empty); }
public async Task CanCreateFloatingIp() { var ip1 = new OpenStack.Network.FloatingIp("12345", "172.0.0.1", FloatingIpStatus.Active); this.ServicePocoClient.CreateFloatingIpDelegate = (ip) => Task.Factory.StartNew(() => ip1); var client = new NetworkServiceClient(GetValidCreds(), "Neutron", CancellationToken.None, this.ServiceLocator); var resp = await client.CreateFloatingIp("12345"); Assert.IsNotNull(resp); Assert.AreEqual(ip1, resp); }