Cover Moq and FakeItEasy in the testing docs - #32
Merged
Conversation
The mocking packages shipped in rc9210 but the guide still read as though NSubstitute were the only option. The alternatives were a table inside a tip box, while every example on the page was written in NSubstitute syntax -- so a Moq reader hit code that does not work for them and no correction anywhere. Choosing a library is now its own section, with the same two configuration lines shown in all three through a code group. The Mock.Get step is called out, since it is the one real difference: NSubstitute and FakeItEasy inject the mock itself, while Moq injects Mock<T>.Object and keeps the mock separate. The install block in the testing guide no longer names NSubstitute as though it were required alongside the xUnit package, and the NuGet nav lists the three mocking packages, which shipped without ever being linked. Examples are taken from the Moq and FakeItEasy integration tests, so the syntax is known to compile. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FasPSEiCXbFwobHLur2pnv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The mocking packages shipped in rc9210, but the guide still read as though NSubstitute were the only
option — the alternatives were a table inside a tip box, while every example on the page was written
in NSubstitute syntax. A Moq reader hit code that does not work for them, with no correction
anywhere on the page.
configuration lines shown in all three via a code group.
Mock.Getis called out explicitly, since it is the one real difference: NSubstitute andFakeItEasy inject the mock itself, Moq injects
Mock<T>.Objectand keeps the mock separate.alongside the xUnit package.
Examples are lifted from the Moq and FakeItEasy integration tests, so the syntax is known to
compile. Site builds clean with
ignoreDeadLinks: false, and the code group renders as tabs.🤖 Generated with Claude Code
https://claude.ai/code/session_01FasPSEiCXbFwobHLur2pnv