Imported Upstream version 5.4.0.167

Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-08-21 15:34:15 +00:00
parent e49d6f06c0
commit 536cd135cc
12856 changed files with 563812 additions and 223249 deletions

View File

@@ -37,12 +37,18 @@ namespace MonoTests.System.Net {
[ExpectedException (typeof (ArgumentNullException))]
public void Basic1 ()
{
#if MONOTOUCH_WATCH || __WATCHOS__
Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
#endif
HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity (null, null);
}
[Test]
public void Basic2 ()
{
#if MONOTOUCH_WATCH || __WATCHOS__
Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
#endif
HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity ("", null);
Assert.AreEqual ("Basic", bi.AuthenticationType, "#01");
Assert.AreEqual ("", bi.Name, "#02");
@@ -53,6 +59,9 @@ namespace MonoTests.System.Net {
[Test]
public void Basic3 ()
{
#if MONOTOUCH_WATCH || __WATCHOS__
Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
#endif
HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity ("hey", null);
Assert.AreEqual ("Basic", bi.AuthenticationType, "#01");
Assert.AreEqual ("hey", bi.Name, "#02");
@@ -63,6 +72,9 @@ namespace MonoTests.System.Net {
[Test]
public void Basic4 ()
{
#if MONOTOUCH_WATCH || __WATCHOS__
Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
#endif
HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity ("hey", "pass");
Assert.AreEqual ("Basic", bi.AuthenticationType, "#01");
Assert.AreEqual ("hey", bi.Name, "#02");

View File

@@ -177,7 +177,7 @@ namespace MonoTests.System
Assert.AreEqual ("?\xA9 2002", b.Query, "#1");
Assert.AreEqual (string.Empty, b.Fragment, "#2");
b.Query = "?test";
Assert.AreEqual ("??test", b.Query, "#3");
Assert.AreEqual ("?test", b.Query, "#3");
b.Query = null;
Assert.AreEqual (string.Empty, b.Query, "#4");
b.Fragment = "test";
@@ -199,7 +199,7 @@ namespace MonoTests.System
Assert.AreEqual ("#\xA9 2002", b.Fragment, "#1");
Assert.AreEqual (string.Empty, b.Query, "#2");
b.Fragment = "#test";
Assert.AreEqual ("##test", b.Fragment, "#3");
Assert.AreEqual ("#test", b.Fragment, "#3");
b.Fragment = null;
Assert.AreEqual (String.Empty, b.Fragment, "#4");
b.Query = "name";
@@ -264,7 +264,7 @@ namespace MonoTests.System
b = new UriBuilder ("http", "www.ximian.com", 80, "/lalala/lelele.aspx", "?");
Assert.AreEqual (noquery, b.Uri.ToString (), "#2");
b = new UriBuilder ("http", "www.ximian.com", 80, "/lalala/lelele.aspx", "??");
Assert.AreEqual (noquery + "??", b.Uri.ToString (), "#3");
Assert.AreEqual (noquery + "?", b.Uri.ToString (), "#3");
b = new UriBuilder ("http", "www.ximian.com", 80, "/lalala/lelele.aspx", "?something");
Assert.AreEqual (noquery + "?something", b.Uri.ToString (), "#4");
}