Skip to content
This repository was archived by the owner on Nov 10, 2026. It is now read-only.

feat: add target framework filter and assertions for assemblies - #256

Merged
vbreuss merged 2 commits into
mainfrom
feature/assembly-target-framework
May 31, 2026
Merged

vbreuss merged 2 commits into
mainfrom
feature/assembly-target-framework

Conversation

@vbreuss

@vbreuss vbreuss commented May 31, 2026

Copy link
Copy Markdown
Member

Add DSL support for matching assemblies by their target framework moniker (e.g. net8.0), mirroring the existing name/version triads:

  • Filter:
    .WhichTarget("net8.0")
  • Assert (single):
    .Targets("net8.0")
  • Assert (many):
    .Target("net8.0")

Matching uses the short TFM moniker, derived from the assembly-level [TargetFramework] attribute via a new MapFrameworkName helper that converts a FrameworkName (.NETCoreApp,Version=v8.0) to its moniker. Assemblies without the attribute are treated as having no target framework and never match.


Add DSL support for matching assemblies by their target framework
moniker (e.g. net8.0), mirroring the existing name/version triads:

- Filter:          .WhichTarget(net8.0)
- Assert (single): .Targets(net8.0)
- Assert (many):   .Target(net8.0)

Matching uses the short TFM moniker, derived from the assembly-level
[TargetFramework] attribute via a new MapFrameworkName helper that
converts a FrameworkName (.NETCoreApp,Version=v8.0) to its moniker.
Assemblies without the attribute are treated as having no target
framework and never match.

Closes #228
@vbreuss vbreuss self-assigned this May 31, 2026
@vbreuss vbreuss added the enhancement New feature or request label May 31, 2026
@vbreuss
vbreuss enabled auto-merge (squash) May 31, 2026 11:13
@github-actions

github-actions Bot commented May 31, 2026 •

Copy link
Copy Markdown

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 9V74 2.60GHz, 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 Allocated
TypeIsNotStatic_aweXpect 206.3 ns 1.06 ns 0.88 ns 0.0386 648 B

@github-actions

github-actions Bot commented May 31, 2026 •

Copy link
Copy Markdown

👽 Mutation Results

Mutation testing badge

aweXpect.Reflection

Details
File Score Killed Survived Timeout No Coverage Ignored Compile Errors Total Detected Total Undetected Total Mutants
Filters/AssemblyFilters.WhichTarget.cs 100.00% 1 0 0 0 1 0 1 0 2
Helpers/AssemblyHelpers.cs 91.89% 32 2 2 1 6 4 34 3 47
ThatAssemblies.Target.cs 70.00% 7 2 0 1 2 8 7 3 20
ThatAssembly.Targets.cs 100.00% 4 0 0 0 1 3 4 0 8

The final mutation score is 88.46%

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

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Test Results

    13 files  ±  0      13 suites  ±0   4m 36s ⏱️ ±0s
 4 157 tests + 37   4 154 ✅ + 37   3 💤 ±0  0 ❌ ±0 
24 922 runs  +222  24 909 ✅ +222  13 💤 ±0  0 ❌ ±0 

Results for commit 1471ad6. ± Comparison against base commit 03a8815.

@vbreuss
vbreuss merged commit 15cfe9b into main May 31, 2026
11 checks passed
@vbreuss
vbreuss deleted the feature/assembly-target-framework branch May 31, 2026 11:17
@github-actions

Copy link
Copy Markdown

This is addressed in release v1.5.0.

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

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.

WhichTarget(framework) filter and assertion for assemblies

1 participant