Skip to content

coverage: improve mutation test coverage (2)#349

Merged
vbreuss merged 1 commit intomainfrom
topic/improve-mutation-coverage-2
Jan 6, 2026
Merged

coverage: improve mutation test coverage (2)#349
vbreuss merged 1 commit intomainfrom
topic/improve-mutation-coverage-2

Conversation

@vbreuss
Copy link
Contributor

@vbreuss vbreuss commented Jan 6, 2026

This PR enhances mutation test coverage by adding new test cases and improving code clarity in the Mockolate test suite. The changes focus on testing edge cases and improving verification scenarios for indexers, properties, and events.

@vbreuss vbreuss self-assigned this Jan 6, 2026
Copilot AI review requested due to automatic review settings January 6, 2026 15:59
@vbreuss vbreuss added the coverage Additional tests for edge cases or improvement of test coverage label Jan 6, 2026
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 enhances mutation test coverage by adding new test cases and improving code clarity in the Mockolate test suite. The changes focus on testing edge cases and improving verification scenarios for indexers, properties, and events.

Reviewed changes

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

Show a summary per file
File Description
Tests/Mockolate.Tests/Verify/VerificationResultTests.cs Added tests for Match.AnyParameters() verification and null value indexer setting; fixed nullable return type for test interface
Tests/Mockolate.Tests/MockProperties/SetupPropertyTests.cs Added test to verify multiple properties can store values simultaneously
Tests/Mockolate.Tests/MockIndexers/SetupIndexerTests.cs Added test to verify multiple indexer values can be stored and retrieved
Tests/Mockolate.Tests/MockEvents/RaiseTests.cs Added test to verify unsubscribing from one event doesn't affect other subscriptions
Source/Mockolate/MockRegistration.Setup.cs Replaced magic boolean literal with named constant and added explanatory comment

@vbreuss
Copy link
Contributor Author

vbreuss commented Jan 6, 2026

See also #347

@vbreuss vbreuss enabled auto-merge (squash) January 6, 2026 15:59
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 6, 2026

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Test Results

    14 files  ± 0      14 suites  ±0   5m 16s ⏱️ -37s
 1 830 tests + 5   1 829 ✅ + 5  1 💤 ±0  0 ❌ ±0 
12 207 runs  +35  12 206 ✅ +35  1 💤 ±0  0 ❌ ±0 

Results for commit 42454ee. ± Comparison against base commit 493efc4.

@vbreuss vbreuss merged commit 86b3191 into main Jan 6, 2026
12 checks passed
@vbreuss vbreuss deleted the topic/improve-mutation-coverage-2 branch January 6, 2026 16:03
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 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.426 μs 0.0056 μs 0.0052 μs 0.2270 - 3.72 KB
Simple_Moq 177.266 μs 1.0836 μs 1.0136 μs 0.4883 - 14.55 KB
Simple_NSubstitute 5.385 μs 0.0146 μs 0.0137 μs 0.5493 0.0076 9.09 KB
Simple_FakeItEasy 6.107 μs 0.0157 μs 0.0147 μs 0.4959 - 8.11 KB

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

This is addressed in release v0.49.0.

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

Labels

coverage Additional tests for edge cases or improvement of test coverage state: released The issue is released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants