From a386b772f733c7ae0899cd294352590c5070e710 Mon Sep 17 00:00:00 2001 From: Alexis Christoforides Date: Wed, 16 Jul 2014 17:40:11 -0400 Subject: [PATCH] Revert "Add a test for Creation event on FileSystemWatcher." This reverts commit 66416d2655bda555f52e7fb73f97d3984cf2fbde. --- .../Test/System.IO/FileSystemWatcherTest.cs | 49 +------------------ 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/mcs/class/System/Test/System.IO/FileSystemWatcherTest.cs b/mcs/class/System/Test/System.IO/FileSystemWatcherTest.cs index 5d3f0fd1e57..4ad27e1a8be 100644 --- a/mcs/class/System/Test/System.IO/FileSystemWatcherTest.cs +++ b/mcs/class/System/Test/System.IO/FileSystemWatcherTest.cs @@ -11,40 +11,12 @@ using NUnit.Framework; using System; using System.IO; -using System.Threading; namespace MonoTests.System.IO { [TestFixture] public class FileSystemWatcherTest { - string base_path; - string path_a; - - FileSystemWatcher SetupWatcher () - { - var fsw = new FileSystemWatcher (); - fsw.Path = base_path; - fsw.IncludeSubdirectories = true; - fsw.EnableRaisingEvents = true; - - return fsw; - } - - [SetUp] - public void Setup () - { - base_path = Path.GetTempPath (); - path_a = Path.Combine (base_path, "a.txt"); - } - - [TearDown] - public void TearDown () - { - if (File.Exists (path_a)) - File.Delete (path_a); - } - [Test] public void CheckDefaults () { @@ -111,26 +83,7 @@ namespace MonoTests.System.IO FileSystemWatcher fw = new FileSystemWatcher (Path.GetTempPath (), "*"); fw.Path = "*"; } - - [Test] - public void TestWatchPathForFileCreation () - { - bool created = false; - var fsw = SetupWatcher (); - - fsw.Created += (object sender, FileSystemEventArgs e) => { - created = true; - }; - - Assert.IsFalse (created); - - File.WriteAllText (path_a, "this should create the file"); - - Thread.Sleep (20); - - Assert.IsTrue (created); - } } } -#endif +#endif \ No newline at end of file -- 2.25.1