Skip to content

feat: Add FileVersionInfo support - #1177

Merged
mergify[bot] merged 32 commits into
TestableIO:mainfrom
t4m45:main
Dec 28, 2024
Merged

mergify[bot] merged 32 commits into
TestableIO:mainfrom
t4m45:main

Conversation

@t4m45

@t4m45 t4m45 commented Dec 16, 2024

Copy link
Copy Markdown
Contributor

Added a wrapper for the immutable FileVersionInfo.

For testing, the IFileVersionInfo can be stored in the MockFileData as a property.
Since testing it is rarely neccessary, I didn't add a constructor for it but it's a mutable property, so it can be set anytime after initialization.
A MockFileVersionInfo has also been added which is mutable.

In a normal scenario, the FileVersionInfo can be accessed through the FileVersionInfo property of IFileInfo.

The MockFileSystem's AddFile method will initialize this version if it's null, and the values will be the default (Only it's FileName will be set).

Since the System.IO.FileInfo does not contain a FileVersionInfo property, I excluded it from the ApiParityTests

PS.: Sorry, seems like were some auto formats on my side which removed some extra spaces and the Visual Studio's Diff viewer did not show these before commit. I'm not really familiar with github, thats why I didn't try to revert them after commit.

Loading
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