Skip to content

Comments

docs: improve documentation#331

Merged
vbreuss merged 3 commits intomainfrom
topic/make-example-more-distinctive
Dec 18, 2025
Merged

docs: improve documentation#331
vbreuss merged 3 commits intomainfrom
topic/make-example-more-distinctive

Conversation

@vbreuss
Copy link
Contributor

@vbreuss vbreuss commented Dec 18, 2025

This PR improves the documentation by reorganizing code examples and expanding configuration details. The changes make the documentation clearer and more comprehensive by moving interface definitions to the top of examples and adding missing information about mock configuration options.

Key changes:

  • Moved interface/delegate definitions to the beginning of code examples for better readability
  • Corrected reference from factory.Create to Mock.Create for consistency
  • Added documentation for the Initialize<T> configuration option and expanded details on DefaultValue behavior

@vbreuss vbreuss self-assigned this Dec 18, 2025
@vbreuss vbreuss added the documentation Improvements or additions to documentation label Dec 18, 2025
@github-actions
Copy link

github-actions bot commented Dec 18, 2025

Test Results

    14 files  ±0      14 suites  ±0   5m 37s ⏱️ +51s
 1 781 tests ±0   1 780 ✅ ±0  1 💤 ±0  0 ❌ ±0 
11 924 runs  ±0  11 923 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 7dde8e1. ± Comparison against base commit 8e21298.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
Intel Xeon Platinum 8370C CPU 2.80GHz, 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-v4

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

Method Mean Error StdDev Gen0 Gen1 Allocated
Simple_Mockolate 1.569 μs 0.0064 μs 0.0054 μs 0.1488 - 3.66 KB
Simple_Moq 138.146 μs 0.4139 μs 0.3669 μs 0.4883 0.2441 14.56 KB
Simple_NSubstitute 5.993 μs 0.0202 μs 0.0189 μs 0.3662 - 9.14 KB
Simple_FakeItEasy 6.328 μs 0.0224 μs 0.0209 μs 0.3281 - 8.12 KB

@vbreuss vbreuss marked this pull request as ready for review December 18, 2025 20:03
Copilot AI review requested due to automatic review settings December 18, 2025 20:03
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 improves the documentation by reorganizing code examples and expanding configuration details. The changes make the documentation clearer and more comprehensive by moving interface definitions to the top of examples and adding missing information about mock configuration options.

  • Moved interface/delegate definitions to the beginning of code examples for better readability
  • Corrected reference from factory.Create to Mock.Create for consistency
  • Added documentation for the Initialize<T> configuration option and expanded details on DefaultValue behavior

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
README.md Reorganized example code to show interface definitions first, fixed incorrect API reference, and added documentation for Initialize and DefaultValue configuration options
Docs/pages/01-create-mocks.md Fixed incorrect API reference and added documentation for Initialize and DefaultValue configuration options
Docs/pages/00-index.md Reorganized example code to show interface definitions first

@vbreuss vbreuss enabled auto-merge (squash) December 18, 2025 20:05
@sonarqubecloud
Copy link

@vbreuss vbreuss merged commit f307591 into main Dec 18, 2025
12 checks passed
@vbreuss vbreuss deleted the topic/make-example-more-distinctive branch December 18, 2025 20:13
@github-actions
Copy link

This is addressed in release v0.46.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.

Docs: add use cases for Mock.Factory Docs: Mock Behavior Options Incomplete

1 participant