feat: add file version info expectations#147
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces first-class aweXpect assertions for System.IO.Abstractions.IFileVersionInfo (as produced by MockFileSystem.FileVersionInfo.GetVersionInfo) and documents their intended usage.
Changes:
- Added
FileVersionInfoExtensionsAPIs for common string properties (e.g., company/product/file versions) and boolean flags (debug/pre-release/patched). - Added shared internal constraints (
FileVersionInfoConstraints) to implement consistent string/bool expectation formatting and inversion behavior. - Added unit tests for the new expectations, updated Public API snapshots, and documented the feature in the README.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/aweXpect.Testably.Tests/FileVersionInfo.cs | Adds the partial test container for FileVersionInfo-scoped tests. |
| Tests/aweXpect.Testably.Tests/FileVersionInfo.HasCompanyName.Tests.cs | Tests HasCompanyName success/failure and .And composition. |
| Tests/aweXpect.Testably.Tests/FileVersionInfo.HasFileDescription.Tests.cs | Tests HasFileDescription success/failure and .And composition. |
| Tests/aweXpect.Testably.Tests/FileVersionInfo.HasFileVersion.Tests.cs | Tests HasFileVersion success/failure and .And composition. |
| Tests/aweXpect.Testably.Tests/FileVersionInfo.HasLanguage.Tests.cs | Tests HasLanguage success/failure and .And composition. |
| Tests/aweXpect.Testably.Tests/FileVersionInfo.HasOriginalFilename.Tests.cs | Tests HasOriginalFilename success/failure and .And composition. |
| Tests/aweXpect.Testably.Tests/FileVersionInfo.HasProductName.Tests.cs | Tests HasProductName success/failure and .And composition. |
| Tests/aweXpect.Testably.Tests/FileVersionInfo.HasProductVersion.Tests.cs | Tests HasProductVersion success/failure and .And composition. |
| Tests/aweXpect.Testably.Tests/FileVersionInfo.IsDebug.Tests.cs | Tests IsDebug/IsNotDebug including failure messages and .And. |
| Tests/aweXpect.Testably.Tests/FileVersionInfo.IsPatched.Tests.cs | Tests IsPatched/IsNotPatched including failure messages and .And. |
| Tests/aweXpect.Testably.Tests/FileVersionInfo.IsPreRelease.Tests.cs | Tests IsPreRelease/IsNotPreRelease including failure messages and .And. |
| Source/aweXpect.Testably/FileVersionInfoExtensions.cs | Adds the partial extension type entry point and XML doc. |
| Source/aweXpect.Testably/FileVersionInfoExtensions.HasCompanyName.cs | Implements HasCompanyName expectation. |
| Source/aweXpect.Testably/FileVersionInfoExtensions.HasFileDescription.cs | Implements HasFileDescription expectation. |
| Source/aweXpect.Testably/FileVersionInfoExtensions.HasFileVersion.cs | Implements HasFileVersion expectation. |
| Source/aweXpect.Testably/FileVersionInfoExtensions.HasLanguage.cs | Implements HasLanguage expectation. |
| Source/aweXpect.Testably/FileVersionInfoExtensions.HasOriginalFilename.cs | Implements HasOriginalFilename expectation. |
| Source/aweXpect.Testably/FileVersionInfoExtensions.HasProductName.cs | Implements HasProductName expectation. |
| Source/aweXpect.Testably/FileVersionInfoExtensions.HasProductVersion.cs | Implements HasProductVersion expectation. |
| Source/aweXpect.Testably/FileVersionInfoExtensions.IsDebug.cs | Implements IsDebug/IsNotDebug expectations. |
| Source/aweXpect.Testably/FileVersionInfoExtensions.IsPatched.cs | Implements IsPatched/IsNotPatched expectations. |
| Source/aweXpect.Testably/FileVersionInfoExtensions.IsPreRelease.cs | Implements IsPreRelease/IsNotPreRelease expectations. |
| Source/aweXpect.Testably/Helpers/FileVersionInfoConstraints.cs | Adds shared string/bool constraint implementations for IFileVersionInfo. |
| Tests/aweXpect.Testably.Api.Tests/Expected/aweXpect.Testably_netstandard2.0.txt | Updates public API snapshot to include new FileVersionInfoExtensions. |
| Tests/aweXpect.Testably.Api.Tests/Expected/aweXpect.Testably_net8.0.txt | Updates public API snapshot to include new FileVersionInfoExtensions. |
| Tests/aweXpect.Testably.Api.Tests/Expected/aweXpect.Testably_net10.0.txt | Updates public API snapshot to include new FileVersionInfoExtensions. |
| README.md | Documents IFileVersionInfo expectations and provides usage examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🚀 Benchmark ResultsDetails
|
👽 Mutation ResultsaweXpect.TestablyDetails
The final mutation score is 58.33%Coverage Thresholds: high:80 low:60 break:0 |
ce494d1 to
ac163f9
Compare
|
|
This is addressed in release v0.15.0. |



This PR introduces first-class aweXpect assertions for
System.IO.Abstractions.IFileVersionInfo(as produced byMockFileSystem.FileVersionInfo.GetVersionInfo) and documents their intended usage.Changes:
FileVersionInfoExtensionsAPIs for common string properties (e.g., company/product/file versions) and boolean flags (debug/pre-release/patched).FileVersionInfoConstraints) to implement consistent string/bool expectation formatting and inversion behavior.