public void GetNetwork(string from, string to, string expectedNetwork) { var fromIp = IPAddress.Parse(from); var toIp = IPAddress.Parse(to); var network = new IPRange(fromIp, toIp).GetNetwork(); Assert.Equal(expectedNetwork, network.ToUpperInvariant()); }