feat: add ComplyWith to string-specialized Elements#952
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds the missing ComplyWith(Action<IThatSubject<string?>>) overload to the string-specialized Elements types for both IEnumerable<string?> and IAsyncEnumerable<string?>, enabling quantifier chains like That(strings).All().ComplyWith(...) to compile and behave like the generic Elements<TItem> variants.
Changes:
- Add
ComplyWith(...)toThatEnumerable.Elements(string specialization) andThatAsyncEnumerable.Elements(string specialization). - Add/extend tests to cover
ComplyWithonIEnumerable<string?>andIAsyncEnumerable<string?>quantifier chains. - Update API approval baselines (
aweXpect_netstandard2.0,aweXpect_net8.0,aweXpect_net10.0) to include the new public methods.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/aweXpect.Tests/Collections/ThatEnumerable.All.ComplyWith.StringTests.cs | New tests covering ComplyWith for IEnumerable<string?> quantifiers. |
| Tests/aweXpect.Tests/Collections/ThatAsyncEnumerable.All.ComplyWith.Tests.cs | Adds string-specific tests for async ComplyWith and minor formatting cleanup. |
| Tests/aweXpect.Api.Tests/Expected/aweXpect_netstandard2.0.txt | Updates API baseline to include ThatEnumerable.Elements.ComplyWith(...) for IEnumerable<string?>. |
| Tests/aweXpect.Api.Tests/Expected/aweXpect_net8.0.txt | Updates API baseline for both sync and async string-specialized Elements.ComplyWith(...). |
| Tests/aweXpect.Api.Tests/Expected/aweXpect_net10.0.txt | Updates API baseline for both sync and async string-specialized Elements.ComplyWith(...). |
| Source/aweXpect/That/Collections/ThatEnumerable.Elements.ComplyWith.cs | Adds the string-specialized Elements.ComplyWith(...) implementation (sync). |
| Source/aweXpect/That/Collections/ThatAsyncEnumerable.Elements.ComplyWith.cs | Adds the string-specialized Elements.ComplyWith(...) overload (async). |
Test Results 23 files - 27 23 suites - 27 7m 47s ⏱️ -24s Results for commit 9ad9a34. ± Comparison against base commit 0d5b1a9. This pull request removes 3179 and adds 3172 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
🚀 Benchmark ResultsDetails
|
👽 Mutation ResultsaweXpectDetails
The final mutation score is 76.30%Coverage Thresholds: high:80 low:60 break:0aweXpect.CoreDetails
The final mutation score is NaN%Coverage Thresholds: high:80 low:60 break:0 |
The Elements class for IEnumerable<string?> and IAsyncEnumerable<string?> was missing the ComplyWith overload that its generic siblings expose. This made `That(stringCollection).All().ComplyWith(it => ...)` and related quantifier chains fail to compile. Add the parallel overload on both sync and async sides.
54349fc to
a6d92a3
Compare
a6d92a3 to
9ad9a34
Compare
|
…lized Elements (#952) by Valentin Breuß
…lized Elements (#952) by Valentin Breuß
|
This is addressed in release v2.34.0. |



The Elements class for IEnumerable<string?> and IAsyncEnumerable<string?> was missing the ComplyWith overload that its generic siblings expose. This made
That(stringCollection).All().ComplyWith(it => ...)and related quantifier chains fail to compile.Add the parallel overload on both sync and async sides.