Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new IsOneOf<T> parameter matcher to the Mockolate library that allows matching parameters against a collection of possible values. Additionally, it refactors the test class naming convention from MatchTests to ItTests to better align with the It class being tested.
Key changes:
- Implements
It.IsOneOf<T>()method for matching parameters against multiple values - Renames test class from
MatchTeststoItTestsacross all test files - Reorganizes tests by moving null-matching tests to a dedicated
IsNullTestsclass
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Source/Mockolate/It.IsOneOf.cs | Implements the new IsOneOf<T> method with internal ParameterIsOneOfMatch<T> class |
| Tests/Mockolate.Tests/ItTests.IsOneOfTests.cs | Adds comprehensive test coverage for IsOneOf<T> including covariance support |
| Tests/Mockolate.Tests/ItTests.cs | Renames parent test class from MatchTests to ItTests |
| Tests/Mockolate.Tests/ItTests.*.cs | Updates all nested test classes to use ItTests parent and consistent Is*Tests naming |
| Tests/Mockolate.Tests/ItTests.IsNullTests.cs | Moves nullable value matching test from IsTests to IsNullTests |
| Tests/Mockolate.Api.Tests/Expected/Mockolate_*.txt | Updates API surface expectations for all target frameworks |
|
Test Results 14 files ± 0 14 suites ±0 4m 51s ⏱️ +17s Results for commit 4586c0b. ± Comparison against base commit 4424f6f. This pull request removes 114 and adds 126 tests. Note that renamed tests count towards both. |
🚀 Benchmark ResultsDetails
|
|
This is addressed in release v0.44.0. |



This PR adds a new
IsOneOf<T>parameter matcher to the Mockolate library that allows matching parameters against a collection of possible values. Additionally, it refactors the test class naming convention fromMatchTeststoItTeststo better align with theItclass being tested.Key changes:
It.IsOneOf<T>()method for matching parameters against multiple valuesMatchTeststoItTestsacross all test filesIt.IsOneOf(params T[])#294