public void SetDnsSetsAValidDns() { string newIp = "176.28.51.226"; string name = "Local Area Connection"; DnsHelper.SetDns(newIp, name); List <IPAddress> ipAddresses = DnsHelper.GetActiveEthernetIpv4DnsAddresses(); DnsHelper.RemoveDns(name); Assert.IsTrue(ipAddresses.Any(ip => ip.ToString() == newIp)); }
public override void ExecuteOption(OptionReport report) { string dns = _databaseAdjustDns.dnsIp; string name = _databaseAdjustDns.adapterName; DnsHelper.SetDns(dns, name); List <IPAddress> addresses = DnsHelper.GetActiveEthernetIpv4DnsAddresses(); report.Success = addresses.Any(address => address.ToString() == dns); return; }
public void GetActiveEthernetIpv4DnsAddressesReturnsAddresses() { List <IPAddress> ipAddresses = DnsHelper.GetActiveEthernetIpv4DnsAddresses(); Assert.AreNotEqual(0, ipAddresses.Count); }