Skip to content

Comments

docs: document MockMonitor and ClearAllInteractions#441

Merged
vbreuss merged 3 commits intomainfrom
topic/document-mockmonitor
Jan 31, 2026
Merged

docs: document MockMonitor and ClearAllInteractions#441
vbreuss merged 3 commits intomainfrom
topic/document-mockmonitor

Conversation

@vbreuss
Copy link
Contributor

@vbreuss vbreuss commented Jan 31, 2026

This PR documents the MockMonitor and ClearAllInteractions features by adding a new documentation page and updating the README. The changes also refactor test code to use the more concise MonitorMock extension method.

Changes:

  • Added documentation for monitoring interactions and clearing interaction history
  • Reorganized documentation files by renumbering existing pages

@vbreuss vbreuss self-assigned this Jan 31, 2026
@vbreuss vbreuss added the documentation Improvements or additions to documentation label Jan 31, 2026
Copilot AI review requested due to automatic review settings January 31, 2026 12:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR documents the MockMonitor and ClearAllInteractions features by adding a new documentation page and updating the README. The changes also refactor test code to use the more concise MonitorMock extension method.

Changes:

  • Added documentation for monitoring interactions and clearing interaction history
  • Updated test code to use the MonitorMock extension method instead of manual monitor creation
  • Reorganized documentation files by renumbering existing pages

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Tests/Mockolate.Tests/Monitor/MockMonitorTests.cs Refactored tests to use MonitorMock extension method
README.md Added monitor interactions section and reformatted heading styles
Mockolate.slnx Updated solution file to include new documentation page
Docs/pages/advanced-features/04-check-for-unexpected-interactions.md Renumbered from 03 and updated heading styles
Docs/pages/advanced-features/03-monitor-interactions.md New documentation page for monitoring interactions

@github-actions
Copy link

Test Results

   13 files   -     8     13 suites   - 8   2m 58s ⏱️ - 2m 35s
2 497 tests  -    20  2 489 ✅  -    27  1 💤 ±0   7 ❌ + 7 
9 732 runs   - 7 068  9 703 ✅  - 7 096  1 💤 ±0  28 ❌ +28 

For more details on these failures, see this check.

Results for commit 724c2a6. ± Comparison against base commit da25886.

This pull request removes 20 tests.
Mockolate.Internal.Tests.CallbackTests+InvokeForCallbacksTests ‑ ShouldIncrementIndexOnceWhenCallbackIsExhausted(forValue: 2, whenMinimum: 0, expectResult: [0, 0, 1, 1, 1, ┬╖┬╖┬╖])
Mockolate.Internal.Tests.CallbackTests+InvokeForCallbacksTests ‑ ShouldIncrementIndexOnceWhenCallbackIsExhausted(forValue: 2, whenMinimum: 1, expectResult: [0, 0, 0, 1, 1, ┬╖┬╖┬╖])
Mockolate.Internal.Tests.CallbackTests+InvokeForReturnThrowsTests ‑ ShouldIncrementIndexWhenForIsNotActive(forValue: 2, whenMinimum: 0, expectResult: [1, 1, 2, 3, 4, ┬╖┬╖┬╖])
Mockolate.Internal.Tests.CallbackTests+InvokeForReturnThrowsTests ‑ ShouldIncrementIndexWhenForIsNotActive(forValue: 2, whenMinimum: 1, expectResult: [1, 2, 2, 3, 4, ┬╖┬╖┬╖])
Mockolate.Internal.Tests.CallbackTests+InvokeForReturnThrowsTests ‑ ShouldIncrementIndexWhenForIsNotActive(forValue: 3, whenMinimum: 1, expectResult: [1, 2, 2, 2, 3, ┬╖┬╖┬╖])
Mockolate.Internal.Tests.CallbackTests+InvokeForReturnThrowsTests ‑ ShouldIncrementIndexWhenForIsNotActive(forValue: 3, whenMinimum: 10, expectResult: [1, 2, 3, 4, 5, ┬╖┬╖┬╖])
Mockolate.Internal.Tests.CallbackTests+InvokeForReturnThrowsTests ‑ ShouldIncrementIndexWhenForIsNotActive(forValue: 5, whenMinimum: 4, expectResult: [1, 2, 3, 4, 5, ┬╖┬╖┬╖])
Mockolate.Internal.Tests.CallbackTests+InvokeForReturnThrowsTests ‑ ShouldIncrementIndexWhenForIsNotActive(forValue: 6, whenMinimum: 4, expectResult: [1, 2, 3, 4, 5, ┬╖┬╖┬╖])
Mockolate.Internal.Tests.CallbackTests+InvokeForReturnThrowsTests ‑ ShouldIncrementIndexWhenForIsNotActive(forValue: 7, whenMinimum: 4, expectResult: [1, 2, 3, 4, 5, ┬╖┬╖┬╖])
Mockolate.Internal.Tests.CallbackTests+InvokeForVoidThrowsTests ‑ ShouldIncrementIndexWhenForIsNotActive(forValue: 2, whenMinimum: 0, expectResult: [1, 1, 2, 3, 4, ┬╖┬╖┬╖])
…

@github-actions
Copy link

github-actions bot commented Jan 31, 2026

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763 2.79GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.102
[Host] : .NET 10.0.2 (10.0.2, 10.0.225.61305), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Method Mean Error StdDev Gen0 Gen1 Allocated
Simple_Mockolate 1.573 μs 0.0288 μs 0.0269 μs 0.2270 - 3.73 KB
Simple_Moq 179.130 μs 0.8697 μs 0.7710 μs 0.4883 - 14.55 KB
Simple_NSubstitute 5.848 μs 0.0417 μs 0.0370 μs 0.5493 0.0076 9.09 KB
Simple_FakeItEasy 6.792 μs 0.0781 μs 0.0731 μs 0.4959 - 8.11 KB

@vbreuss vbreuss merged commit d2df665 into main Jan 31, 2026
8 checks passed
@vbreuss vbreuss deleted the topic/document-mockmonitor branch January 31, 2026 12:25
@sonarqubecloud
Copy link

@github-actions
Copy link

This is addressed in release v1.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation state: released The issue is released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document interaction tracking features

1 participant