public async Task should_get_reverse_dns_data() { var rd = new ReverseDns(); var actual = await rd.DoLookUp("69.109.161.49", AddressType.Ip); Assert.IsNotNull(actual.Data); Assert.AreEqual(ServiceStatus.Ok, actual.Status); }
public async Task should_have_reverse_dns_user_error() { var rd = new ReverseDns(); var actual = await rd.DoLookUp("calebukle.com", AddressType.DomainName); Assert.IsNull(actual.Data); Assert.IsNotNull(actual.ErrorMessage); Assert.AreEqual(ServiceStatus.Bad, actual.Status); }
public async Task should_handle_reverse_dns_format_error() { var rd = new ReverseDns(); var actual = await rd.DoLookUp("blahg.bad.ip", AddressType.Ip); Assert.IsNull(actual.Data); Assert.IsNotNull(actual.ErrorMessage); Assert.AreEqual(ServiceStatus.Bad, actual.Status); }
public async Task should_handle_reverse_dns_socket_error() { var rd = new ReverseDns(); // ip address that shouldn't resolve. var actual = await rd.DoLookUp("18.45.89.54", AddressType.Ip); Assert.IsNull(actual.Data); Assert.IsNotNull(actual.ErrorMessage); Assert.AreEqual(ServiceStatus.Error, actual.Status); }