Skip to content

feat: add triggered notification handler for IFileSystemWatcher#931

Merged
vbreuss merged 5 commits intomainfrom
topic/add-watcher-notification-handler
Feb 1, 2026
Merged

feat: add triggered notification handler for IFileSystemWatcher#931
vbreuss merged 5 commits intomainfrom
topic/add-watcher-notification-handler

Conversation

@vbreuss
Copy link
Member

@vbreuss vbreuss commented Feb 1, 2026

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.

Key Changes:

  • Introduces IWatcherTriggeredHandler interface with OnTriggered method
  • Adds Watcher property to MockFileSystem exposing this handler
  • Updates API test expectations across all target frameworks

@vbreuss vbreuss self-assigned this Feb 1, 2026
@vbreuss vbreuss added the enhancement New feature or request label Feb 1, 2026
Copilot AI review requested due to automatic review settings February 1, 2026 19:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 IWatcherTriggeredHandler interface with OnTriggered method
  • Adds Watcher property to MockFileSystem exposing 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

vbreuss and others added 2 commits February 1, 2026 20:20
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@vbreuss vbreuss enabled auto-merge (squash) February 1, 2026 19:26
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 1, 2026

@vbreuss vbreuss merged commit bf1c858 into main Feb 1, 2026
13 checks passed
@vbreuss vbreuss deleted the topic/add-watcher-notification-handler branch February 1, 2026 21:12
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

This is addressed in release v5.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request state: released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant