public void ReverseTests(string ipAddress, string expected) { var reverser = new IpAddressReverser(); string result = reverser.Reverse(ipAddress); Assert.Equal(expected, result); }
public IPHostEntry GetHostEntry(string address) { var reverser = new IpAddressReverser(); string server = string.Empty; foreach (var ipAddress in this.Spammers) { string reversed = reverser.Reverse(ipAddress.ToString()) + "." + server; if (reversed.Equals(address)) { return(new IPHostEntry { AddressList = this.FakeRblServers.ToArray() }); } } return(new IPHostEntry()); }