Skip to content

Comments

feat: add InitializeFromRealDirectory#945

Merged
vbreuss merged 3 commits intomainfrom
topic/add-InitializeFromRealDirectory
Feb 21, 2026
Merged

feat: add InitializeFromRealDirectory#945
vbreuss merged 3 commits intomainfrom
topic/add-InitializeFromRealDirectory

Conversation

@vbreuss
Copy link
Member

@vbreuss vbreuss commented Feb 21, 2026

Adds support for initializing a MockFileSystem directory structure from an existing directory on the real file system, enabling easier seeding of mock data in tests.

Key Changes:

  • Introduced InitializeFromRealDirectory on FileSystemInitializerExtensions to copy a real directory into an IFileSystem.
  • Added unit tests covering file copy, recursive directory copy, and the missing-source-directory error case.

Support initializing a directory in the `MockFileSystem` from a real directory.
@vbreuss vbreuss self-assigned this Feb 21, 2026
Copilot AI review requested due to automatic review settings February 21, 2026 11:12
@vbreuss vbreuss added the enhancement New feature or request label Feb 21, 2026
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

Adds support for initializing a MockFileSystem directory structure from an existing directory on the real file system, enabling easier seeding of mock data in tests.

Changes:

  • Introduced InitializeFromRealDirectory on FileSystemInitializerExtensions to copy a real directory into an IFileSystem.
  • Added unit tests covering file copy, recursive directory copy, and the missing-source-directory error case.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

File Description
Source/Testably.Abstractions.Testing/FileSystemInitializerExtensions.cs Adds the new initialization API and recursive copy implementation.
Tests/Testably.Abstractions.Testing.Tests/FileSystemInitializerExtensionsTests.cs Adds test coverage for the new initializer behavior.

@vbreuss vbreuss enabled auto-merge (squash) February 21, 2026 11:38
@sonarqubecloud
Copy link

@github-actions
Copy link

Test Results

     52 files  ± 0       52 suites  ±0   37m 32s ⏱️ + 1m 5s
 64 501 tests +15   60 878 ✅ + 7   3 621 💤 +6  2 ❌ +2 
133 854 runs  +40  119 302 ✅ +32  14 550 💤 +6  2 ❌ +2 

For more details on these failures, see this check.

Results for commit 2eb09c0. ± Comparison against base commit 1253c6b.

@vbreuss vbreuss merged commit 64e1721 into main Feb 21, 2026
19 of 22 checks passed
@vbreuss vbreuss deleted the topic/add-InitializeFromRealDirectory branch February 21, 2026 14:58
@github-actions
Copy link

This is addressed in release v5.3.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.

Map actual directories in MockFileSystem

1 participant