Skip to content

Conversation

Romfos
Copy link
Contributor

@Romfos Romfos commented Jul 13, 2025

Changes:

  • Migrate documentation samples to NUnit4
  • Update readme
  • Update acknowledgements
  • Remove NUnit.Framework.Legacy from tests
  • Enable NRE for ProtectedExtensions.cs

@Romfos Romfos requested review from Copilot and dtchepak July 13, 2025 11:37
Copy link

@Copilot 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 migrates all documentation samples and tests to NUnit 4 syntax, removes legacy NUnit support, and updates related project and documentation files.

  • Upgraded NUnit package to version 4
  • Removed NUnit.Framework.Legacy imports and replaced ClassicAssert calls with Assert.That
  • Updated documentation examples and readme/acknowledgements to reflect new syntax and tooling

Reviewed Changes

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

Show a summary per file
File Description
tests/NSubstitute.Documentation.Tests/NSubstitute.Documentation.Tests.csproj Updated NUnit package reference from 3.x to 4.x
tests/NSubstitute.Documentation.Tests.Generator/DocumentationTestsGenerator.cs Removed obsolete NSubstitute.Compatibility import
src/NSubstitute/Extensions/ProtectedExtensions.cs Enabled null-return (object?) and NRE for protected extensions
docs/index.md Converted example Assert.AreEqual to Assert.That syntax
README.md Streamlined build instructions with updated link
acknowledgements.md Marked deprecated tools and updated usage notes
Comments suppressed due to low confidence (2)

README.md:131

  • [nitpick] This line has lost context and proper markdown formatting. Consider restoring build instructions and formatting the link as [Release procedure](https://github.com/nsubstitute/NSubstitute/wiki/Release-procedure) for clarity.
Release-procedure https://github.com/nsubstitute/NSubstitute/wiki/Release-procedure

docs/help/setting-out-and-ref-arguments/index.md:30

  • The actual and expected parameters are reversed. It should read Assert.That(value, Is.EqualTo("world!")); to follow the NUnit Assert.That(actual, constraint) pattern.
Assert.That("world!", Is.EqualTo(value));

@Romfos Romfos mentioned this pull request Jul 13, 2025
23 tasks
@Romfos Romfos merged commit f4b2727 into nsubstitute:main Jul 27, 2025
8 checks passed
@Romfos Romfos deleted the docs branch October 12, 2025 07:47
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.

2 participants