feat: add triggered notification handler for IFileSystemWatcher#931
Merged
feat: add triggered notification handler for IFileSystemWatcher#931
IFileSystemWatcher#931Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new notification handler for IFileSystemWatcher that allows tests to be notified when file system changes are actually triggered by a watcher. This complements the existing Notify handler which fires on all file system changes.
Changes:
- Introduces
IWatcherTriggeredHandlerinterface withOnTriggeredmethod - Adds
Watcherproperty toMockFileSystemexposing this handler - Updates API test expectations across all target frameworks
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Source/Testably.Abstractions.Testing/FileSystem/IWatcherTriggeredHandler.cs | Defines the new interface for watcher-triggered notifications |
| Source/Testably.Abstractions.Testing/FileSystem/ChangeHandler.cs | Implements the IWatcherTriggeredHandler interface and adds notification callback management |
| Source/Testably.Abstractions.Testing/FileSystem/FileSystemWatcherMock.cs | Calls the new notification handler when watcher events are triggered |
| Source/Testably.Abstractions.Testing/MockFileSystem.cs | Exposes the Watcher property to consumers |
| Tests/Testably.Abstractions.Testing.Tests/FileSystem/ChangeHandlerTests.cs | Adds tests verifying watcher-triggered notifications work correctly |
| Tests/Api/Testably.Abstractions.Api.Tests/Expected/*.txt | Updates API surface expectations for all target frameworks |
Source/Testably.Abstractions.Testing/FileSystem/ChangeHandler.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
|
This is addressed in release v5.1.0. |
This was referenced Feb 2, 2026
This was referenced Feb 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR adds a new notification handler for
IFileSystemWatcherthat allows tests to be notified when file system changes are actually triggered by a watcher. This complements the existingNotifyhandler which fires on all file system changes.Key Changes:
IWatcherTriggeredHandlerinterface withOnTriggeredmethodWatcherproperty toMockFileSystemexposing this handler