Skip to content

feat: add file version info expectations#147

Merged
vbreuss merged 1 commit into
mainfrom
feat/file-version-info-extensions
May 19, 2026
Merged

feat: add file version info expectations#147
vbreuss merged 1 commit into
mainfrom
feat/file-version-info-extensions

Conversation

@vbreuss
Copy link
Copy Markdown
Member

@vbreuss vbreuss commented May 19, 2026

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 FileVersionInfoExtensions APIs 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.

@vbreuss vbreuss self-assigned this May 19, 2026
Copilot AI review requested due to automatic review settings May 19, 2026 06:27
@vbreuss vbreuss added the enhancement New feature or request label May 19, 2026
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

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 FileVersionInfoExtensions APIs 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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

Test Results

    7 files  ±  0      7 suites  ±0   48s ⏱️ -5s
  739 tests + 39    738 ✅ + 39  1 💤 ±0  0 ❌ ±0 
4 396 runs  +234  4 395 ✅ +234  1 💤 ±0  0 ❌ ±0 

Results for commit ac163f9. ± Comparison against base commit bd1f6d8.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.300
[Host] : .NET 10.0.8 (10.0.8, 10.0.826.23019), X64 RyuJIT x86-64-v3
DefaultJob : .NET 10.0.8 (10.0.8, 10.0.826.23019), X64 RyuJIT x86-64-v3

Method Mean Error StdDev Gen0 Gen1 Allocated
Dummy_aweXpect 4.692 μs 0.0795 μs 0.0744 μs 0.4349 0.0916 7.31 KB

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

👽 Mutation Results

Mutation testing badge

aweXpect.Testably

Details
File Score Killed Survived Timeout No Coverage Ignored Compile Errors Total Detected Total Undetected Total Mutants
FileVersionInfoExtensions.HasCompanyName.cs 100.00% 1 0 0 0 1 0 1 0 2
FileVersionInfoExtensions.HasFileDescription.cs 100.00% 1 0 0 0 1 0 1 0 2
FileVersionInfoExtensions.HasFileVersion.cs 100.00% 1 0 0 0 1 0 1 0 2
FileVersionInfoExtensions.HasLanguage.cs 100.00% 1 0 0 0 1 0 1 0 2
FileVersionInfoExtensions.HasOriginalFilename.cs 100.00% 1 0 0 0 1 0 1 0 2
FileVersionInfoExtensions.HasProductName.cs 100.00% 1 0 0 0 1 0 1 0 2
FileVersionInfoExtensions.HasProductVersion.cs 100.00% 1 0 0 0 1 0 1 0 2
FileVersionInfoExtensions.IsDebug.cs 50.00% 2 2 0 0 0 0 2 2 4
FileVersionInfoExtensions.IsPatched.cs 50.00% 2 2 0 0 0 0 2 2 4
FileVersionInfoExtensions.IsPreRelease.cs 50.00% 2 2 0 0 0 0 2 2 4
Helpers\FileVersionInfoConstraints.cs 51.72% 15 0 0 14 14 25 15 14 68

The final mutation score is 58.33%

Coverage Thresholds: high:80 low:60 break:0

@vbreuss vbreuss force-pushed the feat/file-version-info-extensions branch from ce494d1 to ac163f9 Compare May 19, 2026 12:25
@sonarqubecloud
Copy link
Copy Markdown

@vbreuss vbreuss enabled auto-merge (squash) May 19, 2026 12:30
@vbreuss vbreuss merged commit 0669d8a into main May 19, 2026
12 checks passed
@vbreuss vbreuss deleted the feat/file-version-info-extensions branch May 19, 2026 12:30
@github-actions
Copy link
Copy Markdown

This is addressed in release v0.15.0.

@github-actions github-actions Bot added the state: released The issue is released label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request state: released The issue is released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants