Skip to content

Releases: nsubstitute/NSubstitute

v5.3.0

28 Oct 09:04
45e00e3
Compare
Choose a tag to compare
  • [NEW] Introduced Substitute.ForTypeForwardingTo to create substitutes that forward interceptable calls to a concrete class. This provides an easy way of implementing a test spy over an existing type. Designed and implemented by @marcoregueira in #700 from a proposal by @wsaeed. Thanks to all who contributed to discussions of this feature.
  • [NEW] Support Raise.EventWith default constructor (#788) by @mihnea-radulescu in #813
  • [NEW] Implement When(...).Throws to avoid confusion with Throw method (#803) by @mihnea-radulescu in #818
  • [FIX] Arg.Any<Arg.AnyType>() does not match arguments passed by reference (#787) by @mihnea-radulescu in #811
  • [FIX] Support matching arguments whose type is generic, when their concrete type is not known (#786) by @mihnea-radulescu in #814
  • [FIX] Release build workflow (#797)
  • [DOC] Add Throws for exceptions to the docs by @304NotModified in #795
  • [DOC] Remove Visual Studio for Mac from readme by @Romfos in #807
  • [TECH] Migrate from NUnit 3 to NUnit 4 by @Romfos in #783
  • [TECH] Update build project to .net 8 by @Romfos in #776
  • [TECH] Code style: use C# 12 collection literals by @Romfos in #810
  • [TECH] Use c# 12 primary constructors by @Romfos in #812
  • [TECH] Added csharp_style_prefer_primary_constructors into editorconfig by @Romfos in #819

Thanks to first-time contributors @mihnea-radulescu and @marcoregueira! Thanks also @304NotModified and @Romfos for their continued support and contributions to this release.

Full Changelog: v5.2.0...v5.3.0

v5.2.0

20 Apr 07:11
19b38fd
Compare
Choose a tag to compare

⚠️ Note: there is no build currently available for this version due to an issue switching over to a new automated release build. We'll have a new release shortly once we sort this.

Summary of main changes:

  • [UPDATE] Upgrade website build to jekyll 3.9.0 and add link to edit website pages (#767, #769; thanks to @brad)
  • [UPDATE] Build improvements:
  • [NEW] Support for Sourcelink and Deterministic Build. Thanks @304NotModified! (#737)

Many thanks to @alexandrnikitin, @Romfos, @brad, and @304NotModified for their contributions!
Thanks a lot to all code contributors, reviewers, and people who have raised and/or commented on issues.

If you haven't already done so, please make sure you add the NSubstitute.Analyzers package wherever you reference NSubstitute: https://nsubstitute.github.io/help/nsubstitute-analysers/

As always, please raise an issue on GitHub if you have any problems.

Changelog: https://github.com/nsubstitute/NSubstitute/blob/v5.2.0/CHANGELOG.md
Breaking changes: None.

Project links:

Change list

New Contributors

  • @brad made their first contribution in #768

Full Changelog: v5.1.0...v5.2.0

v5.1.0

11 Sep 08:27
c3d4c38
Compare
Choose a tag to compare

We've released NSubstitute v5.1.0!

Changes:

  • [DOC] Add clickable headings. Thanks @jheinath! (#729)
  • [UPDATE] Update Castle.Core to 5.1.1-* to support C# 9 covariants. Thanks @siblount to tracking this down. (#730)
  • [UPDATE] Improved support for testing ILogger. Thanks to @zlangner for this contribution, and also thanks to @Saibamen for reviewing this PR. (#732)
  • [NEW] Add Arg.AnyType for matching calls with generic parameters. Thanks @icalvo for implementing and documenting this! (#634, #715, #733).

Thanks a lot to all code contributors, reviewers, and people who have raised and/or commented on issues.

If you haven't already done so, please make sure you add the NSubstitute.Analyzers package wherever you reference NSubstitute: https://nsubstitute.github.io/help/nsubstitute-analysers/

As always, please raise an issue on GitHub if you have any problems.

Changelog: https://github.com/nsubstitute/NSubstitute/blob/v5.1.0/CHANGELOG.md
Breaking changes: NSubstitute Analyzers may produce false positives in some cases for Arg.AnyType. Follow nsubstitute/NSubstitute.Analyzers#212 for progress on this. These warnings can be suppressed if required.

Project links:

v5.0.0

12 Feb 08:48
Compare
Choose a tag to compare

Hi all,

We've released NSubstitute v5.0.0. This release updates our target frameworks to the ones recommended by Microsoft: .NET 6+, .NET Framework 4.6.2+, .NET Standard 2.0+. Thanks to @Romfos for this change (#710), and @alexandrnikitin for the review and merge. Thanks also to @tillw for some clarifications to our docs on internal members (#706).

See full release notes here: https://github.com/nsubstitute/NSubstitute/releases/tag/v5.0.0

Thanks a lot to all code contributors, reviewers, and people who have raised and/or commented on issues.

If you haven't already done so, please make sure you add the NSubstitute.Analyzers package wherever you reference NSubstitute: https://nsubstitute.github.io/help/nsubstitute-analysers/

As always, please raise an issue on GitHub if you have any problems.

Changelog: https://github.com/nsubstitute/NSubstitute/blob/v5.0.0/CHANGELOG.md
Breaking changes:

  • Dropped support for older platforms. Minimum versions now .NET 6+, .NET Framework 4.6.2+, .NET Standard 2.0+

Project links:

What's Changed

New Contributors

Full Changelog: v4.4.0...v5.0.0

v4.4.0

17 Jul 03:51
fed59f6
Compare
Choose a tag to compare

Hi all,

We've released NSubstitute v4.4.0. This adds support for Castle Core v5, thanks to @Havunen (#690, #673), as well as fixing an issue checking for constructor args on null object, courtesy of @phongphanq, and @appel1 (#683, #685). Thanks also to @Mandroide for the code review. @Socolin has also added .ThrowsAsync() that will correctly mock exceptions on async methods (#609, #663).

Thanks a lot to all code contributors, reviewers, and people who have raised and/or commented on issues.

If you haven't already done so, please make sure you add the NSubstitute.Analyzers package wherever you reference NSubstitute: https://nsubstitute.github.io/help/nsubstitute-analysers/

As always, please raise an issue on GitHub if you have any problems.

Changelog: https://github.com/nsubstitute/NSubstitute/blob/v4.4.0/CHANGELOG.md
Breaking changes: There should be no breaking changes with this release.
Project links:

What's Changed

  • Add .ThrowsAsync() that will correctly mock exception on async methods by @Socolin in #663
  • Updated NSubstitute to v5 for modern TFMs by @Havunen in #690
  • CastleDynamicProxyFactory_HasItem_true_when_array_is_null by @phongphanq in #683
  • Add support for ReturnsNull calls for nullable value types by @Stedoss in #692

New Contributors

Full Changelog: v4.3.0...v4.4.0

v4.3.0

24 Jan 13:28
992f2d8
Compare
Choose a tag to compare

Hi everyone,

We've just released NSubstitute v4.3.0. This introduces support for .NET 5 (#636) and .NET 6 (#674). Thanks to @zvirja and @Havunen!

If you haven't already done so, please make sure you add the NSubstitute.Analyzers package wherever you reference NSubstitute: https://nsubstitute.github.io/help/nsubstitute-analysers/

As always, please raise an issue on GitHub or email the group if you have any problems.

Changelog: https://github.com/nsubstitute/NSubstitute/blob/v4.3.0/CHANGELOG.md

Breaking changes: There should be no breaking changes with this release.

Project links:

What's Changed

  • Handle protected and internal property setters by @zvirja in #627
  • Fix typo in help. Changed "was" to "way". by @DarqueWarrior in #628
  • Add .NET 5 target and arrange nullability attributes by @zvirja in #636
  • Slightly refactor code to make it look fresh by @zvirja in #639
  • Update Castle.Core min from 4.4.0 to 4.4.1 by @dtchepak in #640
  • doc: Update property received checking to make use of Discards by @rugk in #651
  • Ignore "null handlers" when a substituted event is raised by @x789 in #667
  • Add argument matching tests to demonstrate matching of value and reference types by @suzicurran in #671
  • Added .Net6 target framework by @Havunen in #674
  • Prep for 4.3.0 release by @dtchepak in #678

New Contributors

Full Changelog: v4.2.2...v4.3.0

v4.2.2

13 Jun 06:01
Compare
Choose a tag to compare

Hi everyone,

We've just released NSubstitute 4.2.2. This patch release fixes a thread-safety issue with auto-value providers (#600, #601). Thanks to Alex Povar (@zvirja) for these changes.

If you haven't already done so, please make sure you add the NSubstitute.Analyzers package wherever you reference NSubstitute: https://nsubstitute.github.io/help/nsubstitute-analysers/

As always, please raise an issue on GitHub or email the group if you have any problems.

Changelog: https://github.com/nsubstitute/NSubstitute/blob/v4.2.2/CHANGELOG.md

Breaking changes: There should be no breaking changes with this release.

Project links: