Ejemplo n.º 1
0
        public void GetNetworkAddress(string input, string mask, string expected)
        {
            IPAddress address     = IPAddress.Parse(input);
            IPAddress maskAddress = IPAddress.Parse(mask);

            Assert.Equal(
                expected,
                IPAddressHelper.GetNetworkAddress(address, maskAddress).ToString());
        }
Ejemplo n.º 2
0
 public void GetNetworkAddress(string address, string subnetMask, string expected)
 {
     Assert.AreEqual(IPAddress.Parse(expected), IPAddressHelper.GetNetworkAddress(IPAddress.Parse(address), IPAddress.Parse(subnetMask)));
 }