Skip to content

Cover Moq and FakeItEasy in the testing docs - #32

Merged
ipjohnson merged 1 commit into
mainfrom
docs/moq-fakeiteasy
Aug 9, 2026
Merged

Cover Moq and FakeItEasy in the testing docs#32
ipjohnson merged 1 commit into
mainfrom
docs/moq-fakeiteasy

Conversation

@ipjohnson

Copy link
Copy Markdown
Owner

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.

  • Choosing a mocking library is now its own section rather than a tip box, with the same two
    configuration lines shown in all three via a code group.
  • Mock.Get is called out explicitly, since it is the one real difference: NSubstitute and
    FakeItEasy inject the mock itself, 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.
  • The NuGet nav lists NSubstitute, Moq and FakeItEasy, which shipped without ever being linked.

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

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
@ipjohnson
ipjohnson merged commit ff173d5 into main Aug 9, 2026
2 checks passed
@ipjohnson
ipjohnson deleted the docs/moq-fakeiteasy branch August 9, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant