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

feat: add virtual and override property filters and assertions - #294

Merged
vbreuss merged 1 commit into
mainfrom
feature/244-virtual-override-property-filters
Jun 3, 2026
Merged

vbreuss merged 1 commit into
mainfrom
feature/244-virtual-override-property-filters

Conversation

@vbreuss

@vbreuss vbreuss commented Jun 3, 2026

Copy link
Copy Markdown
Member

Add filtering and assertion methods for virtual dispatch and override chains on properties, mirroring the existing method-based API:

  • Filters: WhichAreVirtual/WhichAreNotVirtual, WhichOverride/WhichDoNotOverride
  • Single assertions: IsVirtual/IsNotVirtual, Overrides/DoesNotOverride
  • Many assertions: AreVirtual/AreNotVirtual, Override/DoNotOverride

Virtual/override detection is based on the property's accessor methods (GetMethod/SetMethod): a property is virtual if either accessor is virtual, and overrides if either accessor overrides a base method.


Add filtering and assertion methods for virtual dispatch and override
chains on properties, mirroring the existing method-based API:

- Filters: WhichAreVirtual/WhichAreNotVirtual, WhichOverride/WhichDoNotOverride
- Single assertions: IsVirtual/IsNotVirtual, Overrides/DoesNotOverride
- Many assertions: AreVirtual/AreNotVirtual, Override/DoNotOverride

Virtual/override detection is based on the property's accessor methods
(GetMethod/SetMethod): a property is virtual if either accessor is
virtual, and overrides if either accessor overrides a base method.
@vbreuss vbreuss self-assigned this Jun 3, 2026
@vbreuss vbreuss added the enhancement New feature or request label Jun 3, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jun 3, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Test Results

    13 files  ±  0      13 suites  ±0   7m 8s ⏱️ + 1m 36s
 5 351 tests + 48   5 348 ✅ + 48   3 💤 ±0  0 ❌ ±0 
32 086 runs  +288  32 073 ✅ +288  13 💤 ±0  0 ❌ ±0 

Results for commit e92e164. ± Comparison against base commit 757e3f0.

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 2.74GHz, 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 217.7 ns 2.19 ns 2.05 ns 0.0386 648 B

@github-actions

github-actions Bot commented Jun 3, 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/PropertyFilters.WhichAreVirtual.cs 100.00% 3 0 0 0 0 0 3 0 3
Filters/PropertyFilters.WhichOverride.cs 100.00% 3 0 0 0 0 0 3 0 3
Helpers/PropertyInfoHelpers.cs 100.00% 58 0 0 0 6 2 58 0 66
ThatProperties.AreVirtual.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatProperties.Override.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatProperty.IsVirtual.cs 100.00% 10 0 0 0 3 6 10 0 19
ThatProperty.Overrides.cs 100.00% 10 0 0 0 3 6 10 0 19

The final mutation score is 100.00%

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

@vbreuss
vbreuss merged commit 88ecba6 into main Jun 3, 2026
11 checks passed
@vbreuss
vbreuss deleted the feature/244-virtual-override-property-filters branch June 3, 2026 08:28
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

This is addressed in release v1.6.0.

@github-actions github-actions Bot added the state: released The issue is released label Jun 3, 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.

WhichAreVirtual() / WhichOverride() filters and assertions for properties

1 participant