public void BuildInvalidIPAddressTest(string ipOrHost, bool throwException) { if (throwException) { Assert.Throws <AggregateException>(() => NetHelper.BuildIPAddress(ipOrHost)); } else { Assert.Null(NetHelper.BuildIPAddress(ipOrHost)); } }
public void BuildValidIPAddressTest() { var ipAddress = NetHelper.BuildIPAddress("127.0.0.1"); Assert.NotNull(ipAddress); }