public void Socket_ReceiveMessageFromDnsEndPoint_Throws()
{
using (Socket socket = new Socket(SocketType.Dgram, ProtocolType.Udp))
{
int port = socket.BindToAnonymousPort(IPAddress.IPv6Loopback);
EndPoint receivedFrom = new DnsEndPoint("localhost", port, AddressFamily.InterNetworkV6);
SocketFlags socketFlags = SocketFlags.None;
IPPacketInformation ipPacketInformation;
Assert.Throws<ArgumentException>(() =>
{
int received = socket.ReceiveMessageFrom(new byte[1], 0, 1, ref socketFlags, ref receivedFrom, out ipPacketInformation);
});
}
}