ListNetworks() public method

public ListNetworks ( ) : IEnumerable
return IEnumerable
 public void ListNetworksTest()
 {
     var os = new OpenStackMember(UserName, Password, TenantName, TenantId);
     var networks = os.ListNetworks();
     Assert.IsNotNull(networks);
     foreach (var n in networks)
     {
         Trace.WriteLine(string.Format("networkid : {0}, name : {1}", n.Id, n.Name));
     }
 }
 public void GetNetworkTest()
 {
     var os = new OpenStackMember(UserName, Password, TenantName, TenantId);
     var networks = os.ListNetworks();
     Assert.IsNotNull(networks);
     foreach (var n in networks)
     {
         var network = os.GetNetwork(n.Id);
         Assert.IsNotNull(network);
     }
 }
        private string GetInterfaceAttachmentIdByTesterName(string testerName = null)
        {
            testerName = testerName ?? TesterName;

            var os = new OpenStackMember(UserName, Password, TenantName);

            IEnumerable<Network> networks = os.ListNetworks();
            Network n = networks.Where<Network>(x => x.Name == testerName).FirstOrDefault<Network>();
            if (n == null)
            {
                try
                {
                    n = os.CreateNetwork(testerName);
                    Trace.WriteLine(string.Format("network added : {0}", DateTime.Now));
                    Trace.WriteLine(string.Format("NetworkId : {0}, Name : {1}", n.Id, n.Name));
                }
                catch (Exception)
                {
                    throw;
                }
            }
            IEnumerable<Port> ports = os.ListPorts();
            Port p = ports.Where<Port>(x => x.Name == testerName).FirstOrDefault<Port>();
            if (p == null)
            {
                try
                {
                    p = os.CreatePort(n.Id);
                    Trace.WriteLine(string.Format("port added : {0}", DateTime.Now));
                    Trace.WriteLine(string.Format("PortId : {0}, Name : {1}", p.Id, p.Name));
                }
                catch (Exception)
                {
                    throw;
                }
            }

            return p.Id;
        }