Skip to content

Conversation

@rfvgyhn
Copy link
Contributor

@rfvgyhn rfvgyhn commented Jan 7, 2026

This PR sets UnixFileMode when creating a new mock file stream via MockFileSystem.FileStream.New(string, FileStreamOptions).

  • Adds UnixFileMode argument to FileStreamMock constructors
  • Sets UnixFileMode if valid FileMode is used
  • Throws ArgumentException if invalid FileMode is used
  • Passes FileStreamOptions.UnixCreateMode in FileStreamFactoryMock to FileStreamMock
  • Adds new CallStatistics overload to handle an additional parameter
  • Adds tests

Not sure if the unit tests are in the correct location.

Fixes: #914

Copy link
Member

@vbreuss vbreuss left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @rfvgyhn!
I will release an updated version shortly...

@vbreuss vbreuss merged commit 21f3502 into Testably:main Jan 10, 2026
11 checks passed
@github-actions
Copy link

This is addressed in release v5.0.2.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MockFileSystem.FileStream.New Doesn't Set UnixFileMode

2 participants