public void CreateEvents_AreQueued_WhenFilesAreCreatedInOneFolder(int numOfFiles, int expectedValue)
        {
            _manager.Monitor(_folders);
            TestFileSystemHelper.CreateDummyFiles(_folders[0].Path, numOfFiles);

            AssertQueueItemCount(expectedValue, item => item.EventArgs.ChangeType == WatcherChangeTypes.Created);
        }
        public void CreateEvents_AreQueued_WhenFilesAreCreatedInDifferntFolders(int numOfFiles, int numOfFolders, int expectedValue)
        {
            _manager.Monitor(_folders);

            Parallel.For(0, numOfFolders, i => TestFileSystemHelper.CreateDummyFiles(_folders[i].Path, numOfFiles));

            AssertQueueItemCount(expectedValue, item => item.EventArgs.ChangeType == WatcherChangeTypes.Created);
        }
        public void ChangeEvents_AreQueued_WhenFilesAreChanged(int numOfFiles, int expectedValue)
        {
            _manager.Monitor(_folders);

            var folder = _folders[0];

            TestFileSystemHelper.CreateDummyFiles(folder.Path, numOfFiles);
            Parallel.ForEach(Directory.GetFiles(folder.Path), file => File.WriteAllText(file, "Hello World"));

            AssertQueueItemCount(expectedValue, item => item.EventArgs.ChangeType == WatcherChangeTypes.Changed);
        }
        public void DeleteEvents_AreQueued_WhenFilesAreDeleted(int numOfFiles, int expectedValue)
        {
            _manager.Monitor(_folders);

            var folder = _folders[0];

            TestFileSystemHelper.CreateDummyFiles(folder.Path, numOfFiles);
            foreach (var file in Directory.GetFiles(folder.Path))
            {
                File.Delete(file);
            }

            AssertQueueItemCount(expectedValue, item => item.EventArgs.ChangeType == WatcherChangeTypes.Deleted);
        }