Imported Upstream version 4.4.0.182

Former-commit-id: ea38b2115ac3af9a394fe6cddf2be2acd11bc002
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-06-14 09:39:34 +00:00
parent ee13743634
commit 180e8b1935
125 changed files with 1658 additions and 521 deletions

View File

@ -7,13 +7,6 @@
// (C) 2001 Mads Pultz
// (C) 2003 Martin Willemoes Hansen
//
// This test assumes the following:
// 1) The following Internet sites exist:
// www.go-mono.com with IP address 64.14.94.188
// info.diku.dk with IP address 130.225.96.4
// 2) The following DNS name does not exist:
// www.hopefullydoesnotexist.dk
//
using System;
using System.Collections;
@ -28,12 +21,12 @@ namespace MonoTests.System.Net
[TestFixture]
public class DnsTest
{
private String site1Name = "jenkins.mono-project.com",
site1Dot = "162.253.133.196",
site2Name = "info.diku.dk",
site2Dot = "130.225.96.4",
private String site1Name = "google-public-dns-a.google.com",
site1Dot = "8.8.8.8",
site2Name = "google-public-dns-b.google.com",
site2Dot = "8.8.4.4",
noneExistingSite = "unlikely.xamarin.com";
private uint site1IP = 1852407392, site2IP = 2195808260; // Big-Endian
private uint site1IP = 134744072, site2IP = 134743044; // Big-Endian
[Test]
public void AsyncGetHostByName ()
@ -44,7 +37,7 @@ namespace MonoTests.System.Net
IAsyncResult async = Dns.BeginGetHostByName (site1Name, null, null);
IPHostEntry entry = Dns.EndGetHostByName (async);
SubTestValidIPHostEntry (entry);
Assert.IsTrue (entry.HostName == "jenkins.mono-project.com");
Assert.IsTrue (entry.HostName == "google-public-dns-a.google.com");
}
void GetHostByNameCallback (IAsyncResult ar)
@ -189,7 +182,7 @@ namespace MonoTests.System.Net
[Test]
public void GetHostByName ()
{
SubTestGetHostByName ("jenkins.mono-project.com", site1Dot);
SubTestGetHostByName (site1Name, site1Dot);
SubTestGetHostByName (site2Name, site2Dot);
try {
var entry = Dns.GetHostByName (noneExistingSite);