refactor: simplify Callback class#452
Conversation
and add missing test cases
035b030 to
8090223
Compare
There was a problem hiding this comment.
Pull request overview
This PR simplifies the Callback class by removing redundant increment operations and adds comprehensive test coverage for callback limiting behavior in parallel and sequential scenarios.
Changes:
- Removed duplicate counter increments (
_forIterationCountand_matchingCount) from threeInvokemethod overloads in theCallbackclass - Added test cases to verify index increment behavior when
Forlimits are exhausted - Added test case to verify execution limiting when running callbacks in parallel
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Source/Mockolate/Setup/Callback.cs | Removed duplicate counter increment statements from Invoke method overloads |
| Tests/Mockolate.Internal.Tests/CallbackTests.cs | Added test coverage for For limit exhaustion and parallel execution limiting |
🚀 Benchmark ResultsDetails
|
|
|
This is addressed in release v1.2.0. |



This PR simplifies the
Callbackclass by removing redundant increment operations and adds comprehensive test coverage for callback limiting behavior in parallel and sequential scenarios.Key Changes:
_forIterationCountand_matchingCount) from threeInvokemethod overloads in theCallbackclassForlimits are exhausted