coverage: add missing tests for async result verification#499
Conversation
There was a problem hiding this comment.
Pull request overview
Adds missing coverage around async verification results in Mockolate’s verification API, while also adjusting the async verification loop and updating API baselines to reflect a removed helper.
Changes:
- Add new tests validating
IAsyncVerificationResult.VerifyAsync(...)success behavior and thatWithin(...)/WithCancellation(...)return an async-capable verification result. - Adjust async verification loop behavior in
VerificationResult<T>.Awaitable.VerifyAsync(...). - Remove
MethodSetup.Matches(...)and update API snapshot expectations accordingly.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Tests/Mockolate.Tests/Verify/VerificationResultTests.AsyncTests.cs | Adds async-result verification tests and type assertions for async verification results. |
| Source/Mockolate/Verify/VerificationResult.cs | Changes the async verification wait loop behavior. |
| Source/Mockolate/Setup/MethodSetup.cs | Removes a protected static helper that was part of the public surface for derived setups. |
| Tests/Mockolate.Api.Tests/Expected/Mockolate_netstandard2.0.txt | Updates expected API surface after removing MethodSetup.Matches(...). |
| Tests/Mockolate.Api.Tests/Expected/Mockolate_net8.0.txt | Updates expected API surface after removing MethodSetup.Matches(...). |
| Tests/Mockolate.Api.Tests/Expected/Mockolate_net10.0.txt | Updates expected API surface after removing MethodSetup.Matches(...). |
Comments suppressed due to low confidence (1)
Source/Mockolate/Setup/MethodSetup.cs:149
- Removing
protected static Matches(NamedParameter[] ..., NamedParameterValue[] ...)fromMethodSetupis a public API breaking change for any external derived setups. If the intent is only to remove an internal helper, consider keeping it (potentially[Obsolete]) until a major version bump, or moving it to an internal helper type so consumers aren’t broken unexpectedly.
/// <summary>
/// Triggers the parameter callbacks for each value in the specified array according to
/// the corresponding named parameter.
/// </summary>
protected static void TriggerCallbacks(NamedParameter?[] namedParameters, object?[] values)
|
Test Results 21 files ± 0 21 suites ±0 5m 26s ⏱️ +7s Results for commit d7f6875. ± Comparison against base commit e4100c8. This pull request removes 1 and adds 4 tests. Note that renamed tests count towards both. |
🚀 Benchmark ResultsDetails
|
|
This is addressed in release v1.5.0. |



Adds missing coverage around async verification results in Mockolate’s verification API, while also adjusting the async verification loop and updating API baselines to reflect a removed helper.
Key Changes:
IAsyncVerificationResult.VerifyAsync(...)success behavior and thatWithin(...)/WithCancellation(...)return an async-capable verification result.VerificationResult<T>.Awaitable.VerifyAsync(...).MethodSetup.Matches(...)and update API snapshot expectations accordingly.