Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

docs: document collection matchers - #656

#656
Merged
vbreuss merged 1 commit into
mainTestably/Mockolate:mainfrom
topic/add-documentation-for-collection-matchersTestably/Mockolate:topic/add-documentation-for-collection-matchersCopy head branch name to clipboard
Apr 19, 2026
Merged

docs: document collection matchers#656
vbreuss merged 1 commit into
mainTestably/Mockolate:mainfrom
topic/add-documentation-for-collection-matchersTestably/Mockolate:topic/add-documentation-for-collection-matchersCopy head branch name to clipboard

Conversation

@vbreuss

@vbreuss vbreuss commented Apr 19, 2026

Copy link
Copy Markdown
Member

This PR updates the public documentation to cover the new collection-oriented parameter matchers and keeps the existing Span matcher docs intact by moving them below the new section.

Changes:

  • Document It.Contains<T>(item) and It.SequenceEquals<T>(...), including supported collection shapes and custom comparers via .Using(IEqualityComparer<T>).
  • Add examples demonstrating containment, ordered sequence matching, and case-insensitive equality.
  • Extend the verification docs to list the new matchers under “Argument Matchers”.

@vbreuss vbreuss self-assigned this Apr 19, 2026
@vbreuss vbreuss added the documentation Improvements or additions to documentation label Apr 19, 2026
Copilot AI review requested due to automatic review settings April 19, 2026 06:54

Copilot AI left a comment

Copy link
Copy Markdown

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 updates the public documentation to cover the new collection-oriented parameter matchers and keeps the existing Span matcher docs intact by moving them below the new section.

Changes:

  • Document It.Contains<T>(item) and It.SequenceEquals<T>(...), including supported collection shapes and custom comparers via .Using(IEqualityComparer<T>).
  • Add examples demonstrating containment, ordered sequence matching, and case-insensitive equality.
  • Extend the verification docs to list the new matchers under “Argument Matchers”.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
README.md Adds a new “Collection Matchers” section with supported shapes, .Using(...), and examples; adds the matchers to the verification matcher list.
Docs/pages/setup/04-parameter-matching.md Adds “Collection Matchers” section mirroring README guidance and examples; moves Span section below.
Docs/pages/04-verify-interactions.md Adds It.Contains / It.SequenceEquals to the argument matcher list for verification.

Comment thread README.md Outdated
Comment thread Docs/pages/04-verify-interactions.md Outdated
@github-actions

github-actions Bot commented Apr 19, 2026

Copy link
Copy Markdown

Test Results

    21 files  ±0      21 suites  ±0   6m 0s ⏱️ -25s
 3 042 tests ±0   3 041 ✅ ±0  1 💤 ±0  0 ❌ ±0 
20 427 runs  ±0  20 426 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 0b693e4. ± Comparison against base commit 70cdde4.

♻️ This comment has been updated with latest results.

@vbreuss
vbreuss force-pushed the topic/add-documentation-for-collection-matchers branch from 6785db2 to 0b693e4 Compare April 19, 2026 07:01
@vbreuss
vbreuss enabled auto-merge (squash) April 19, 2026 07:04
@github-actions

github-actions Bot commented Apr 19, 2026

Copy link
Copy Markdown

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 3.24GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.202
[Host] : .NET 10.0.6 (10.0.6, 10.0.626.17701), X64 RyuJIT x86-64-v3

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

Method Mean Error StdDev Ratio RatioSD Gen0 Gen1 Allocated Alloc Ratio
Event_Mockolate 459.5 ns 6.78 ns 6.01 ns 1.00 0.02 0.0830 - 1.36 KB 1.00
Event_Moq 17,033.2 ns 161.35 ns 150.93 ns 37.07 0.57 0.7629 - 12.57 KB 9.25
Event_NSubstitute 6,048.0 ns 117.11 ns 109.54 ns 13.16 0.29 0.5569 0.0076 9.17 KB 6.75
Event_FakeItEasy 214,349.4 ns 1,113.07 ns 986.71 ns 466.52 6.28 0.7324 0.4883 15.26 KB 11.23
Event_Imposter 1,424.7 ns 21.54 ns 19.10 ns 3.10 0.06 0.5379 0.0153 8.8 KB 6.48
Event_TUnitMocks 199.7 ns 8.46 ns 7.91 ns 0.43 0.02 0.0837 0.0002 1.37 KB 1.01
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 3.24GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.202
[Host] : .NET 10.0.6 (10.0.6, 10.0.626.17701), X64 RyuJIT x86-64-v3

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

Method Mean Error StdDev Ratio RatioSD Gen0 Gen1 Allocated Alloc Ratio
Indexer_Mockolate 823.2 ns 5.64 ns 5.00 ns 1.00 0.01 0.1383 - 2.27 KB 1.00
Indexer_Moq 188,020.1 ns 1,038.58 ns 971.49 ns 228.42 1.76 0.7324 0.4883 14.57 KB 6.43
Indexer_NSubstitute 6,345.7 ns 160.52 ns 150.15 ns 7.71 0.18 0.5722 - 9.41 KB 4.16
Indexer_FakeItEasy 6,289.4 ns 33.71 ns 29.88 ns 7.64 0.06 0.4883 0.0153 8.03 KB 3.54
Indexer_Imposter 790.6 ns 34.33 ns 32.11 ns 0.96 0.04 0.2928 0.0048 4.8 KB 2.12
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 3.24GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.202
[Host] : .NET 10.0.6 (10.0.6, 10.0.626.17701), X64 RyuJIT x86-64-v3

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

Method Mean Error StdDev Ratio RatioSD Gen0 Gen1 Allocated Alloc Ratio
Method_Mockolate 676.3 ns 27.31 ns 25.55 ns 1.00 0.05 0.1345 - 2.2 KB 1.00
Method_Moq 187,839.7 ns 1,034.94 ns 864.22 ns 278.10 10.25 0.7324 0.4883 14.59 KB 6.62
Method_NSubstitute 6,051.4 ns 44.84 ns 39.75 ns 8.96 0.33 0.5493 0.0076 9.09 KB 4.12
Method_FakeItEasy 6,350.8 ns 47.16 ns 36.82 ns 9.40 0.35 0.4883 0.0153 8.05 KB 3.65
Method_Imposter 652.0 ns 9.54 ns 7.96 ns 0.97 0.04 0.2537 0.0029 4.15 KB 1.88
Method_TUnitMocks 770.1 ns 14.49 ns 13.56 ns 1.14 0.05 0.1774 0.0010 2.9 KB 1.32
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 3.24GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.202
[Host] : .NET 10.0.6 (10.0.6, 10.0.626.17701), X64 RyuJIT x86-64-v3

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

Method Mean Error StdDev Ratio RatioSD Gen0 Gen1 Allocated Alloc Ratio
Property_Mockolate 503.5 ns 3.07 ns 2.87 ns 1.00 0.01 0.0896 - 1.47 KB 1.00
Property_Moq 4,848.4 ns 23.05 ns 21.56 ns 9.63 0.07 0.3281 - 5.48 KB 3.73
Property_NSubstitute 5,081.7 ns 57.17 ns 50.68 ns 10.09 0.11 0.5188 0.0076 8.58 KB 5.84
Property_FakeItEasy 4,774.9 ns 133.11 ns 124.52 ns 9.48 0.25 0.3815 0.0153 6.35 KB 4.32
Property_Imposter 457.6 ns 13.73 ns 12.85 ns 0.91 0.03 0.1783 0.0019 2.91 KB 1.98
Property_TUnitMocks 590.9 ns 11.85 ns 11.08 ns 1.17 0.02 0.1249 - 2.05 KB 1.40
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 7763 3.24GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.202
[Host] : .NET 10.0.6 (10.0.6, 10.0.626.17701), X64 RyuJIT x86-64-v3

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

Method Mean Error StdDev Ratio RatioSD Gen0 Gen1 Allocated Alloc Ratio
Callback_Mockolate 401.4 ns 11.42 ns 10.69 ns 1.00 0.04 0.0968 - 1.59 KB 1.00
Callback_Moq 97,676.6 ns 859.13 ns 803.63 ns 243.48 6.50 0.4883 0.2441 8.88 KB 5.60
Callback_NSubstitute 4,447.9 ns 51.87 ns 48.52 ns 11.09 0.31 0.4730 0.0076 7.74 KB 4.88
Callback_FakeItEasy 4,806.2 ns 158.65 ns 140.64 ns 11.98 0.46 0.4120 0.0153 6.81 KB 4.29
Callback_Imposter 405.7 ns 5.72 ns 5.07 ns 1.01 0.03 0.1454 0.0010 2.38 KB 1.50
Callback_TUnitMocks 595.0 ns 4.43 ns 3.70 ns 1.48 0.04 0.1602 0.0010 2.63 KB 1.66

@sonarqubecloud

Copy link
Copy Markdown

@vbreuss
vbreuss merged commit 3b60498 into main Apr 19, 2026
12 checks passed
@vbreuss
vbreuss deleted the topic/add-documentation-for-collection-matchers branch April 19, 2026 07:09
@github-actions

Copy link
Copy Markdown

This is addressed in release v3.0.0.

@github-actions github-actions Bot added the state: released The issue is released label Apr 30, 2026
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.

Add collection parameter matchers

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.