Imported Upstream version 6.0.0.172

Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-04-12 14:10:50 +00:00
parent 8016999e4d
commit 64ac736ec5
32155 changed files with 3981439 additions and 75368 deletions

View File

@ -12,6 +12,8 @@ using NUnit.Framework;
using System;
using System.IO;
using MonoTests.Helpers;
namespace MonoTests.System.IO
{
[TestFixture]
@ -54,7 +56,9 @@ namespace MonoTests.System.IO
[ExpectedException (typeof (ArgumentNullException))]
public void CheckCtor4 ()
{
FileSystemWatcher fw = new FileSystemWatcher (Path.GetTempPath (), null);
using (var tmp = new TempDirectory ()) {
FileSystemWatcher fw = new FileSystemWatcher (tmp.Path, null);
}
}
[Test]
@ -62,8 +66,12 @@ namespace MonoTests.System.IO
// [ExpectedException (typeof (ArgumentException))]
public void CheckCtor5 ()
{
FileSystemWatcher fw = new FileSystemWatcher (Path.GetTempPath (), "invalidpath|");
fw = new FileSystemWatcher (Path.GetTempPath (), "*");
using (var tmp1 = new TempDirectory ()) {
using (var tmp2 = new TempDirectory ()) {
FileSystemWatcher fw = new FileSystemWatcher (tmp1.Path, "invalidpath|");
fw = new FileSystemWatcher (tmp2.Path, "*");
}
}
}
[Test]
@ -71,8 +79,10 @@ namespace MonoTests.System.IO
[ExpectedException (typeof (ArgumentException))]
public void CheckInvalidPath ()
{
FileSystemWatcher fw = new FileSystemWatcher (Path.GetTempPath (), "invalidpath|");
fw.Path = "invalidpath|";
using (var tmp = new TempDirectory ()) {
FileSystemWatcher fw = new FileSystemWatcher (tmp.Path, "invalidpath|");
fw.Path = "invalidpath|";
}
}
[Test]
@ -80,8 +90,10 @@ namespace MonoTests.System.IO
[ExpectedException (typeof (ArgumentException))]
public void CheckPathWildcard ()
{
FileSystemWatcher fw = new FileSystemWatcher (Path.GetTempPath (), "*");
fw.Path = "*";
using (var tmp = new TempDirectory ()) {
FileSystemWatcher fw = new FileSystemWatcher (tmp.Path, "*");
fw.Path = "*";
}
}
}
}