You've already forked linux-packaging-mono
Imported Upstream version 5.12.0.220
Former-commit-id: c477e03582759447177c6d4bf412cd2355aad476
This commit is contained in:
parent
8bd104cef2
commit
8fc30896db
@ -55,6 +55,7 @@ namespace MonoTests.System.Net
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("MultiThreaded")]
|
||||
public void Async ()
|
||||
{
|
||||
WebResponse res = null;
|
||||
@ -463,6 +464,7 @@ namespace MonoTests.System.Net
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("MultiThreaded")]
|
||||
public void GetRequestStream_File_Exists ()
|
||||
{
|
||||
Stream s = File.Create (_tempFile);
|
||||
|
@ -185,6 +185,7 @@ namespace MonoTests.System.Net
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("MultiThreaded")]
|
||||
public void ResponseUri ()
|
||||
{
|
||||
FileWebRequest req = (FileWebRequest) WebRequest.Create (_tempFileUri);
|
||||
|
@ -1 +1 @@
|
||||
4cabb0ca84eac14cc074c0d4c57ee60a33f65cad
|
||||
a0154e7ba83fa85a9caed000fd90aa90d75ae63b
|
@ -875,7 +875,7 @@ namespace MonoTests.System.Net
|
||||
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#A2");
|
||||
Assert.IsNull (ex.InnerException, "#A3");
|
||||
Assert.IsNotNull (ex.Message, "#A4");
|
||||
Assert.AreEqual ("size", ex.ParamName, "#A5");
|
||||
Assert.AreEqual ("count", ex.ParamName, "#A5");
|
||||
}
|
||||
|
||||
// read full response
|
||||
@ -890,7 +890,7 @@ namespace MonoTests.System.Net
|
||||
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#B2");
|
||||
Assert.IsNull (ex.InnerException, "#B3");
|
||||
Assert.IsNotNull (ex.Message, "#B4");
|
||||
Assert.AreEqual ("size", ex.ParamName, "#B5");
|
||||
Assert.AreEqual ("count", ex.ParamName, "#B5");
|
||||
}
|
||||
} finally {
|
||||
rs.Close ();
|
||||
@ -928,7 +928,7 @@ namespace MonoTests.System.Net
|
||||
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#A2");
|
||||
Assert.IsNull (ex.InnerException, "#A3");
|
||||
Assert.IsNotNull (ex.Message, "#A4");
|
||||
Assert.AreEqual ("size", ex.ParamName, "#A5");
|
||||
Assert.AreEqual ("count", ex.ParamName, "#A5");
|
||||
}
|
||||
|
||||
// read full response
|
||||
@ -943,7 +943,7 @@ namespace MonoTests.System.Net
|
||||
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#B2");
|
||||
Assert.IsNull (ex.InnerException, "#B3");
|
||||
Assert.IsNotNull (ex.Message, "#B4");
|
||||
Assert.AreEqual ("size", ex.ParamName, "#B5");
|
||||
Assert.AreEqual ("count", ex.ParamName, "#B5");
|
||||
}
|
||||
} finally {
|
||||
rs.Close ();
|
||||
@ -1221,6 +1221,7 @@ namespace MonoTests.System.Net
|
||||
|
||||
[Test]
|
||||
[Category ("StaticLinkedAotNotWorking")] // Native MPH loading issues
|
||||
[Category ("MobileNotWorking")] // https://github.com/xamarin/xamarin-macios/issues/3827
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
|
@ -23,25 +23,6 @@ namespace MonoTests.System.Net
|
||||
[TestFixture]
|
||||
public class WebClientTest
|
||||
{
|
||||
private string _tempFolder;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp ()
|
||||
{
|
||||
_tempFolder = Path.Combine (Path.GetTempPath (),
|
||||
GetType ().FullName);
|
||||
if (Directory.Exists (_tempFolder))
|
||||
Directory.Delete (_tempFolder, true);
|
||||
Directory.CreateDirectory (_tempFolder);
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown ()
|
||||
{
|
||||
if (Directory.Exists (_tempFolder))
|
||||
Directory.Delete (_tempFolder, true);
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (WebException))] // Something catches the PlatformNotSupportedException and re-throws an WebException
|
||||
@ -842,8 +823,7 @@ namespace MonoTests.System.Net
|
||||
[Test] // UploadFile (string, string)
|
||||
public void UploadFile1_Address_Null ()
|
||||
{
|
||||
string tempFile = Path.Combine (_tempFolder, "upload.tmp");
|
||||
File.Create (tempFile).Close ();
|
||||
string tempFile = Path.GetTempFileName ();
|
||||
|
||||
WebClient wc = new WebClient ();
|
||||
try {
|
||||
@ -855,14 +835,16 @@ namespace MonoTests.System.Net
|
||||
Assert.IsNotNull (ex.Message, "#4");
|
||||
Assert.IsNotNull (ex.ParamName, "#5");
|
||||
Assert.AreEqual ("address", ex.ParamName, "#6");
|
||||
} finally {
|
||||
if (File.Exists (tempFile))
|
||||
File.Delete (tempFile);
|
||||
}
|
||||
}
|
||||
|
||||
[Test] // UploadFile (string, string)
|
||||
public void UploadFile1_Address_SchemeNotSupported ()
|
||||
{
|
||||
string tempFile = Path.Combine (_tempFolder, "upload.tmp");
|
||||
File.Create (tempFile).Close ();
|
||||
string tempFile = Path.GetTempFileName ();
|
||||
|
||||
WebClient wc = new WebClient ();
|
||||
try {
|
||||
@ -882,13 +864,17 @@ namespace MonoTests.System.Net
|
||||
Assert.AreEqual (typeof (NotSupportedException), inner.GetType (), "#7");
|
||||
Assert.IsNull (inner.InnerException, "#8");
|
||||
Assert.IsNotNull (inner.Message, "#9");
|
||||
} finally {
|
||||
if (File.Exists (tempFile))
|
||||
File.Delete (tempFile);
|
||||
}
|
||||
}
|
||||
|
||||
[Test] // UploadFile (string, string)
|
||||
public void UploadFile1_FileName_NotFound ()
|
||||
{
|
||||
string tempFile = Path.Combine (_tempFolder, "upload.tmp");
|
||||
var tempPath = Path.GetTempPath ();
|
||||
string tempFile = Path.Combine (tempPath, Path.GetRandomFileName ());
|
||||
|
||||
WebClient wc = new WebClient ();
|
||||
try {
|
||||
@ -934,7 +920,7 @@ namespace MonoTests.System.Net
|
||||
[Test] // UploadFile (Uri, string)
|
||||
public void UploadFile2_Address_Null ()
|
||||
{
|
||||
string tempFile = Path.Combine (_tempFolder, "upload.tmp");
|
||||
string tempFile = Path.GetRandomFileName ();
|
||||
|
||||
WebClient wc = new WebClient ();
|
||||
try {
|
||||
@ -952,8 +938,7 @@ namespace MonoTests.System.Net
|
||||
[Test] // UploadFile (Uri, string)
|
||||
public void UploadFile2_Address_SchemeNotSupported ()
|
||||
{
|
||||
string tempFile = Path.Combine (_tempFolder, "upload.tmp");
|
||||
File.Create (tempFile).Close ();
|
||||
string tempFile = Path.GetTempFileName ();
|
||||
|
||||
WebClient wc = new WebClient ();
|
||||
try {
|
||||
@ -973,13 +958,17 @@ namespace MonoTests.System.Net
|
||||
Assert.AreEqual (typeof (NotSupportedException), inner.GetType (), "#7");
|
||||
Assert.IsNull (inner.InnerException, "#8");
|
||||
Assert.IsNotNull (inner.Message, "#9");
|
||||
} finally {
|
||||
if (File.Exists (tempFile))
|
||||
File.Delete (tempFile);
|
||||
}
|
||||
}
|
||||
|
||||
[Test] // UploadFile (Uri, string)
|
||||
public void UploadFile2_FileName_NotFound ()
|
||||
{
|
||||
string tempFile = Path.Combine (_tempFolder, "upload.tmp");
|
||||
var tempPath = Path.GetTempPath ();
|
||||
string tempFile = Path.Combine (tempPath, Path.GetRandomFileName ());
|
||||
|
||||
WebClient wc = new WebClient ();
|
||||
try {
|
||||
@ -1025,8 +1014,7 @@ namespace MonoTests.System.Net
|
||||
[Test] // UploadFile (string, string, string)
|
||||
public void UploadFile3_Address_Null ()
|
||||
{
|
||||
string tempFile = Path.Combine (_tempFolder, "upload.tmp");
|
||||
File.Create (tempFile).Close ();
|
||||
string tempFile = Path.GetRandomFileName ();
|
||||
|
||||
WebClient wc = new WebClient ();
|
||||
try {
|
||||
@ -1037,15 +1025,14 @@ namespace MonoTests.System.Net
|
||||
Assert.IsNull (ex.InnerException, "#3");
|
||||
Assert.IsNotNull (ex.Message, "#4");
|
||||
Assert.IsNotNull (ex.ParamName, "#5");
|
||||
Assert.AreEqual ("path", ex.ParamName, "#6");
|
||||
Assert.AreEqual ("address", ex.ParamName, "#6");
|
||||
}
|
||||
}
|
||||
|
||||
[Test] // UploadFile (string, string, string)
|
||||
public void UploadFile3_Address_SchemeNotSupported ()
|
||||
{
|
||||
string tempFile = Path.Combine (_tempFolder, "upload.tmp");
|
||||
File.Create (tempFile).Close ();
|
||||
string tempFile = Path.GetTempFileName ();
|
||||
|
||||
WebClient wc = new WebClient ();
|
||||
try {
|
||||
@ -1065,13 +1052,17 @@ namespace MonoTests.System.Net
|
||||
Assert.AreEqual (typeof (NotSupportedException), inner.GetType (), "#7");
|
||||
Assert.IsNull (inner.InnerException, "#8");
|
||||
Assert.IsNotNull (inner.Message, "#9");
|
||||
} finally {
|
||||
if (File.Exists (tempFile))
|
||||
File.Delete (tempFile);
|
||||
}
|
||||
}
|
||||
|
||||
[Test] // UploadFile (string, string, string)
|
||||
public void UploadFile3_FileName_NotFound ()
|
||||
{
|
||||
string tempFile = Path.Combine (_tempFolder, "upload.tmp");
|
||||
var tempPath = Path.GetTempPath ();
|
||||
string tempFile = Path.Combine (tempPath, Path.GetRandomFileName ());
|
||||
|
||||
WebClient wc = new WebClient ();
|
||||
try {
|
||||
@ -1117,7 +1108,7 @@ namespace MonoTests.System.Net
|
||||
[Test] // UploadFile (Uri, string, string)
|
||||
public void UploadFile4_Address_Null ()
|
||||
{
|
||||
string tempFile = Path.Combine (_tempFolder, "upload.tmp");
|
||||
string tempFile = Path.GetRandomFileName ();
|
||||
|
||||
WebClient wc = new WebClient ();
|
||||
try {
|
||||
@ -1135,8 +1126,7 @@ namespace MonoTests.System.Net
|
||||
[Test] // UploadFile (Uri, string, string)
|
||||
public void UploadFile4_Address_SchemeNotSupported ()
|
||||
{
|
||||
string tempFile = Path.Combine (_tempFolder, "upload.tmp");
|
||||
File.Create (tempFile).Close ();
|
||||
string tempFile = Path.GetTempFileName ();
|
||||
|
||||
WebClient wc = new WebClient ();
|
||||
try {
|
||||
@ -1156,13 +1146,17 @@ namespace MonoTests.System.Net
|
||||
Assert.AreEqual (typeof (NotSupportedException), inner.GetType (), "#7");
|
||||
Assert.IsNull (inner.InnerException, "#8");
|
||||
Assert.IsNotNull (inner.Message, "#9");
|
||||
} finally {
|
||||
if (File.Exists (tempFile))
|
||||
File.Delete (tempFile);
|
||||
}
|
||||
}
|
||||
|
||||
[Test] // UploadFile (Uri, string, string)
|
||||
public void UploadFile4_FileName_NotFound ()
|
||||
{
|
||||
string tempFile = Path.Combine (_tempFolder, "upload.tmp");
|
||||
var tempPath = Path.GetTempPath ();
|
||||
string tempFile = Path.Combine (tempPath, Path.GetRandomFileName ());
|
||||
|
||||
WebClient wc = new WebClient ();
|
||||
try {
|
||||
@ -1691,6 +1685,7 @@ namespace MonoTests.System.Net
|
||||
// We throw a PlatformNotSupportedException deeper, which is caught and re-thrown as WebException
|
||||
[ExpectedException (typeof (WebException))]
|
||||
#endif
|
||||
[Category ("MobileNotWorking")] // https://github.com/xamarin/xamarin-macios/issues/3827
|
||||
[Category ("InetAccess")]
|
||||
public void GetWebRequestOverriding ()
|
||||
{
|
||||
@ -1874,8 +1869,7 @@ namespace MonoTests.System.Net
|
||||
{
|
||||
UploadAsyncCancelEventTest (9304,(webClient, uri, cancelEvent) =>
|
||||
{
|
||||
string tempFile = Path.Combine (_tempFolder, "upload.tmp");
|
||||
File.Create (tempFile).Close ();
|
||||
string tempFile = Path.GetTempFileName ();
|
||||
|
||||
webClient.UploadFileCompleted += (sender, args) =>
|
||||
{
|
||||
|
Reference in New Issue
Block a user