public void setDHCPTest() { string nic = "WrongTestNIC"; int rtn = Win32_NetAdapConfig_Help.SetDHCP(nic); Assert.AreEqual(-1, rtn); }
public void setIPTest() { string nic = "WrongTestNIC"; int[] rtn = Win32_NetAdapConfig_Help.SetIP(nic, "", "", "", ""); Assert.AreEqual(-1, rtn[0]); Assert.AreEqual(-1, rtn[1]); Assert.AreEqual(-1, rtn[2]); }
public void getIPTest() { string[] ipAddress = null; string[] subnets = null; string[] gateways = null; string[] dnses = null; string nicName = "WrongTestNIC"; Win32_NetAdapConfig_Help.GetIP(nicName, out ipAddress, out subnets, out gateways, out dnses); Assert.AreEqual(null, ipAddress); Assert.AreEqual(null, subnets); Assert.AreEqual(null, gateways); Assert.AreEqual(null, dnses); }
public void getNICsTest() { ArrayList nicList = Win32_NetAdapConfig_Help.getNetworkCards(); Assert.Greater(nicList.Count, 0); }