Skip to content

refactor: improve mocking tests in FileSystemTests#1456

Merged
vbreuss merged 3 commits intomainfrom
topic/improve-mocking-tests
Apr 9, 2026
Merged

refactor: improve mocking tests in FileSystemTests#1456
vbreuss merged 3 commits intomainfrom
topic/improve-mocking-tests

Conversation

@vbreuss
Copy link
Copy Markdown
Member

@vbreuss vbreuss commented Apr 9, 2026

Refactors FileSystemTests to more directly validate mocked IFile behavior, and updates test dependencies to support the new assertion/verification style.

Changes:

  • Update Mock_File_Succeeds to assert ReadAllText returns a configured value and verify the call occurred.
  • Add aweXpect.Mockolate to the shared test package references.
  • Bump Mockolate package version and centrally define the aweXpect.Mockolate version.

@vbreuss vbreuss self-assigned this Apr 9, 2026
Copilot AI review requested due to automatic review settings April 9, 2026 19:03
Copy link
Copy Markdown

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

Refactors FileSystemTests to more directly validate mocked IFile behavior, and updates test dependencies to support the new assertion/verification style.

Changes:

  • Update Mock_File_Succeeds to assert ReadAllText returns a configured value and verify the call occurred.
  • Add aweXpect.Mockolate to the shared test package references.
  • Bump Mockolate package version and centrally define the aweXpect.Mockolate version.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/TestableIO.System.IO.Abstractions.Wrappers.Tests/FileSystemTests.cs Strengthens the mock test by asserting return value and verifying invocation.
tests/Directory.Build.props Adds aweXpect.Mockolate to the common test dependencies.
Directory.Packages.props Updates central package versions for Mockolate and adds aweXpect.Mockolate.

@vbreuss vbreuss enabled auto-merge (squash) April 9, 2026 19:08
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

@vbreuss vbreuss merged commit a091ac7 into main Apr 9, 2026
11 checks passed
@vbreuss vbreuss deleted the topic/improve-mocking-tests branch April 9, 2026 19:14
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

This is addressed in release v22.1.1.

@github-actions github-actions bot added the state: released Issues that are released label Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: released Issues that are released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants