Assert.NotNull(hostEntry.Aliases);
}
+ [Fact]
public void TryGetAddrInfo_HostName()
{
string hostName = NameResolutionPal.GetHostName();
SocketError error = NameResolutionPal.TryGetAddrInfo(hostName, out hostEntry, out nativeErrorCode);
if (error == SocketError.HostNotFound && (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)))
{
- // On Unix, we are not guaranteed to be able to resove the local host. The ability to do so depends on the
+ // On Unix, we are not guaranteed to be able to resove the local host. The ability to do so depends on the
// machine configurations, which varies by distro and is often inconsistent.
return;
}
throw new InvalidOperationException("Name resolution failure preventable with retry");
}
}
-
+
Assert.Equal(SocketError.Success, error);
Assert.NotNull(hostEntry);
Assert.NotNull(hostEntry.HostName);
Assert.NotNull(name);
}
+ [Fact]
public void TryGetAddrInfo_HostName_TryGetNameInfo()
{
string hostName = NameResolutionPal.GetHostName();