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

feat: add MemberScope option to ContainXXX filters and assertions - #296

Merged
vbreuss merged 1 commit into
mainfrom
feat/member-scope-contain-filters
Jun 4, 2026
Merged

vbreuss merged 1 commit into
mainfrom
feat/member-scope-contain-filters

Conversation

@vbreuss

@vbreuss vbreuss commented Jun 4, 2026

Copy link
Copy Markdown
Member

Add an optional MemberScope parameter to the type filters (WhichContainProperties/WhichContainMethods/WhichContainFields/ WhichContainEvents) and the corresponding assertions (ContainsXXX on a single type and ContainXXX on a collection of types, including the IAsyncEnumerable overloads).

The parameter defaults to MemberScope.DeclaredOnly to preserve behavior; MemberScope.IncludingInherited lets a type match on inherited members. Constructors are intentionally excluded, as they are never inherited.

Public API approval files updated for all target frameworks.

Add an optional `MemberScope` parameter to the type filters
(`WhichContainProperties`/`WhichContainMethods`/`WhichContainFields`/
`WhichContainEvents`) and the corresponding assertions
(`ContainsXXX` on a single type and `ContainXXX` on a collection of types,
including the IAsyncEnumerable overloads).

The parameter defaults to `MemberScope.DeclaredOnly` to preserve behavior;
`MemberScope.IncludingInherited` lets a type match on inherited members.
Constructors are intentionally excluded, as they are never inherited.

Public API approval files updated for all target frameworks.
@vbreuss vbreuss self-assigned this Jun 4, 2026
@vbreuss vbreuss added the enhancement New feature or request label Jun 4, 2026
@vbreuss vbreuss changed the title feat: add MemberScope option to ContainXXX filters and assertions feat: add MemberScope option to ContainXXX filters and assertions Jun 4, 2026
@vbreuss
vbreuss enabled auto-merge (squash) June 4, 2026 06:13
@sonarqubecloud

sonarqubecloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Test Results

    13 files  ±  0      13 suites  ±0   6m 44s ⏱️ +20s
 5 405 tests + 28   5 402 ✅ + 28   3 💤 ±0  0 ❌ ±0 
32 410 runs  +168  32 397 ✅ +168  13 💤 ±0  0 ❌ ±0 

Results for commit a8c0dee. ± Comparison against base commit f7b38bf.

@vbreuss
vbreuss merged commit 1d56941 into main Jun 4, 2026
11 checks passed
@vbreuss
vbreuss deleted the feat/member-scope-contain-filters branch June 4, 2026 06:18
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 9V74 2.87GHz, 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 211.1 ns 0.94 ns 0.73 ns 0.0386 648 B

@github-actions

github-actions Bot commented Jun 4, 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
ThatType.ContainsMethods.cs 94.44% 17 1 0 0 2 10 17 1 30
ThatTypes.ContainMethods.cs 92.86% 13 1 0 0 2 10 13 1 26

The final mutation score is 93.75%

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

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown

This is addressed in release v2.0.0.

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

1 participant