Repository navigation
feat: Add FileVersionInfo support - #1177
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a wrapper for the immutable
FileVersionInfo.For testing, the
IFileVersionInfocan be stored in theMockFileDataas 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
MockFileVersionInfohas also been added which ismutable.In a normal scenario, the
FileVersionInfocan be accessed through theFileVersionInfoproperty ofIFileInfo.The
MockFileSystem'sAddFilemethod 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.FileInfodoes not contain aFileVersionInfoproperty, I excluded it from theApiParityTestsPS.: 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.