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