Releases: nsubstitute/NSubstitute
v5.3.0
- [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
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:
- NuGet:
- GitHub: http://github.com/nsubstitute/NSubstitute
- Web: http://nsubstitute.github.io/
Change list
- Documentation: introduce clickable tooltips to copy hx url by @jheinath in #736
- Move CI to GitHub actions by @alexandrnikitin in #740
- Support Sourcelink and Deterministic Build by @304NotModified in #737
- [Github] Run unit tests for all test platforms by @Romfos in #742
- Move from AppVeyor to GitHub Actions by @alexandrnikitin in #754
- Added .NET 8 to test platforms by @Romfos in #756
- Format source code and add format verification on ci by @Romfos in #758
- Format NSubstitute.csproj layout + remove unusable code for net4.5 by @Romfos in #761
- Enable ImplicitUsings by @Romfos in #762
- Use file scoped namepsaces by @Romfos in #763
- Upgrade jekyll to 3.9.0 by @brad in #768
- add edit this page link by @brad in #769
- [CI] Do not build on every push by @alexandrnikitin in #774
- [Docs] Update Ruby and docs dependencies to the latest versions by @alexandrnikitin in #773
- Prep for v5.2 release by @dtchepak in #791
New Contributors
Full Changelog: v5.1.0...v5.2.0
v5.1.0
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
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:
- NuGet:
- GitHub: http://github.com/nsubstitute/NSubstitute
- Web: http://nsubstitute.github.io/
What's Changed
- Revised chapter 'Internal members' by @x789 in #706
- Fix CI by @alexandrnikitin in #711
- Update target frameworks for .NET 6, .NET Framework 4.6.2, .NET Standard 2.0 by @Romfos in #710
New Contributors
Full Changelog: v4.4.0...v5.0.0
v4.4.0
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:
- NuGet:
- GitHub: http://github.com/nsubstitute/NSubstitute
- Web: http://nsubstitute.github.io/
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
- @Socolin made their first contribution in #663
- @phongphanq made their first contribution in #683
- @Stedoss made their first contribution in #692
Full Changelog: v4.3.0...v4.4.0
v4.3.0
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:
- NuGet:
- GitHub: http://github.com/nsubstitute/NSubstitute
- Web: http://nsubstitute.github.io/
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
- @DarqueWarrior made their first contribution in #628
- @rugk made their first contribution in #651
- @x789 made their first contribution in #667
- @suzicurran made their first contribution in #671
- @Havunen made their first contribution in #674
Full Changelog: v4.2.2...v4.3.0
v4.2.2
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: