Skip to content

Comments

refactor!: remove MockMonitorExtensions#298

Merged
vbreuss merged 1 commit intomainfrom
topic/remove-mockmonitorextensions
Dec 11, 2025
Merged

refactor!: remove MockMonitorExtensions#298
vbreuss merged 1 commit intomainfrom
topic/remove-mockmonitorextensions

Conversation

@vbreuss
Copy link
Contributor

@vbreuss vbreuss commented Dec 11, 2025

This PR removes the MockMonitorExtensions class from Mockolate, completing a migration to source-generated extensions. The changes align with the project's architecture of using source generators for compile-time code generation.

Key Changes:

  • Removed the manually written MockMonitorExtensions class from the codebase
  • Updated API compatibility baselines to reflect the removal of this class
  • Functionality is maintained through source-generated extensions

They were replaced with source-generated extensions
@vbreuss vbreuss self-assigned this Dec 11, 2025
Copilot AI review requested due to automatic review settings December 11, 2025 19:47
@vbreuss vbreuss added the breaking change The changes require a new major version label Dec 11, 2025
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 removes the MockMonitorExtensions class from Mockolate, completing a migration to source-generated extensions. The changes align with the project's architecture of using source generators for compile-time code generation.

Key Changes:

  • Removed the manually written MockMonitorExtensions class from the codebase
  • Updated API compatibility baselines to reflect the removal of this class
  • Functionality is maintained through source-generated extensions

Reviewed changes

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

File Description
Source/Mockolate/Monitor/MockMonitorExtensions.cs Deleted the entire MockMonitorExtensions class containing the Monitor<T> extension method
Tests/Mockolate.Api.Tests/Expected/Mockolate_netstandard2.0.txt Updated API baseline to remove MockMonitorExtensions from expected public API surface
Tests/Mockolate.Api.Tests/Expected/Mockolate_net8.0.txt Updated API baseline to remove MockMonitorExtensions from expected public API surface
Tests/Mockolate.Api.Tests/Expected/Mockolate_net10.0.txt Updated API baseline to remove MockMonitorExtensions from expected public API surface

@sonarqubecloud
Copy link

@vbreuss vbreuss enabled auto-merge (squash) December 11, 2025 19:51
@github-actions
Copy link

Test Results

    14 files  ±0      14 suites  ±0   4m 39s ⏱️ +2s
 1 534 tests ±0   1 533 ✅ ±0  1 💤 ±0  0 ❌ ±0 
10 227 runs  ±0  10 226 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 02c4fad. ± Comparison against base commit a45333a.

@vbreuss vbreuss merged commit 4424f6f into main Dec 11, 2025
12 checks passed
@vbreuss vbreuss deleted the topic/remove-mockmonitorextensions branch December 11, 2025 19:55
@github-actions
Copy link

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.101
[Host] : .NET 10.0.1 (10.0.1, 10.0.125.57005), 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.591 μs 0.0100 μs 0.0094 μs 0.2232 - 3.66 KB
Simple_Moq 177.369 μs 0.8626 μs 0.7647 μs 0.4883 - 14.55 KB
Simple_NSubstitute 5.898 μs 0.0668 μs 0.0624 μs 0.5569 0.0076 9.14 KB
Simple_FakeItEasy 6.680 μs 0.0660 μs 0.0618 μs 0.4959 - 8.11 KB

@github-actions
Copy link

This is addressed in release v0.44.0.

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

Labels

breaking change The changes require a new major version state: released The issue is released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant