All Versions
41
Latest Version
Avg Release Cycle
111 days
Latest Release
275 days ago

Changelog History
Page 1

  • v4.2.2

    June 01, 2020

    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:

  • v4.2.1

    July 01, 2019
    • [FIX] It might be impossible to assign ref and out arguments using type-compatible value. (#577, @zvirja)
    • πŸ”§ [FIX] Configured result is returned in the Received.InOrder check causing tests to fail sometimes. (#569, @zvirja)
  • v4.2.0

    May 01, 2019
    • [FIX] Raise events for delegates taking single array argument of reference element type. (#560, @zvirja)
    • [NEW] Quantity.Within(min, max) to assert a call was received within a range of times. This is available in the NSubstitute.ReceivedExtensions namespace. (#558)
  • v4.1.0

    May 01, 2019
    • πŸ”§ [FIX] Re-throw captured NSubstitute exceptions when configuring async methods. (#533, @zvirja)
    • 🐎 [UPDATE] Various performance improvements. (#536, #542, #547, @zvirja)
    • ⚑️ [UPDATE] Use Castle.Proxy library to generate delegate proxies. (#537, @zvirja)
    • [FIX] Do not fail on nested generic type formatting. (#515, @zvirja)
    • [FIX] Fix event handling for code created by non-ECMA compliant compilers. (#500, #525, @zvirja)
    • ⚑️ [UPDATE] Thanks to Julian Verdurmen (@304NotModified) for updating our website and links to HTTPS! All links to the NSub website should now go through https://nsubstitute.github.io, 🌐 and other web links in the project also go through to HTTPS where supported.
    • πŸ“š [UPDATE] Documentation updates (#516 thanks to Michael Freidgeim @MNF; #530, #531 thanks to @304NotModified; #540, #549)
  • v4.0.0

    January 01, 2019

    Thanks to core team member Alex Povar (@zvirja) for putting a huge amount of work into πŸš€ defining and implementing features, fixes and refactoring for this release! Also thanks to @tpodolak for the new NSubstitute.Analyzers project! Finally, thanks to everyone who submitted PRs, raised or commented on issues, or took the time to help answer questions on StackOverflow.

    Major new features and improvements

    • [NEW] NSubstitute.Analyzers project. πŸ”§ Uses Roslyn to detect potential problems with NSubstitute configurations, such as trying to substitute for non-virtual members. Whenever you add NSubstitute to your C# or VB project, πŸ“¦ don't forget to also add the corresponding NSubstitute.Analyzers package! Thanks to @tpodolak for starting and running this project!
    • [NEW] CallBase for enabling base method calls for specific methods. (#449, @zvirja)
    • [NEW][BREAKING] Arg matchers (Arg.Is etc) can now be used for ref and out arguments. πŸ‘€ See [BreakingChanges.md](BreakingChanges.md) if you are still using pre-C#7. (#404, @zvirja)
    • πŸ”§ [NEW] Configure() extension in NSubstitute.Extensions.ConfigurationExtensions to πŸ”§ ensure NSubstitute handles the next call as a configuration/specification. (#350, @zvirja)
    • 🐎 [UPDATE] Performance improvements. (@zvirja)
      • CallResults performance optimisation
      • Delegate proxy generation improvements (#362)
      • Minimise allocations and LINQ use on hot code paths (#390)
      • Optimise array allocation (#395)
    • ⚑️ [UPDATE][BREAKING] Calls made with one or more argument matchers (Arg.Is or Arg.Any) πŸ”§ will no longer return previously configured results. NSubstitute will assume the call is πŸ”§ being configured and avoid running logic configured via previous Returns() calls. πŸ‘€ This helps fix some problems with overlapping configurations. See #345 and [BreakingChanges.md](BreakingChanges.md) for more information. (@zvirja)

    πŸ†• New and improved debugging, errors and error messages

    • πŸ”§ [NEW] Raise CouldNotConfigureBaseMethodException when trying to configure a call to call a base method that does not exist. (#429, @zvirja)
    • [NEW] Raise RedundantArgumentMatcherException if extra arg matchers are detected. This is βœ… a huge help for immediately identifying misconfigured tests. (@zvirja)
    • ⚑️ [UPDATE] Improved AmbiguousArgumentsException behaviour and errors. (#403 and others; @zvirja)
    • [NEW] Improve debugging experience with proxy ids. (#39, @zvirja)
    • ⚑️ [UPDATE] Improved display of MatchArgs to help with debugging. (@zvirja)
    • βœ… [NEW][BREAKING] Detection of unused argument matchers. This helps to identify errors in tests due to incorrectly used argument matchers. (#361, #89, #279; @zvirja)

    And lots, lots more!

    Including (but not limited to):

    • πŸ‘ [NEW] Support for netstandard-2.0. (#447, @zvirja)
    • [FIX] Improved handling of virtual calls in constructors. (#423, @zvirja)
    • πŸ”§ [NEW] Added a set of When() overloads to configure async methods without compilation warnings. (#468, @zvirja)
    • πŸ›  [FIX] Fixed potential for ArgumentNullException on finalizer thread. (#382, @zvirja)
    • ⚑️ [UPDATE] Now using Castle.Core 4.3.1+. We :heart: you Castle.Core! (Thanks for the PR Alexandr Nikitin!)
    • [NEW] Expose .Received(Quantity) in NSubstitute.ReceivedExtensions namespace. Thanks to @firelizzard18 for this suggestion.
    • ⚑️ [UPDATE] Made substitute setup and verification more robust in the concurrent environments. (#462, @zvirja)
    • ⚑️ [UPDATE] Removed NSubstitute.Core.Extensions.Zip (no longer require NET35 support). (#336)
    • πŸ“š [FIX] Restored XML documentation. (#345)
    • [NEW] Made global NSubstitute customization more easier. (#448, @zvirja)
    • πŸ“š [UPDATE] Documentation updates and fixes. Thanks to @jsbed, Chris Maddock, Jim Aho (#369), and Mathias Lorenzen.
    • ⚑️ [UPDATE] Updated builds thanks to Alexandr Nikitin.
    • ♻️ [UPDATE] Significant refactoring thanks to Alex Povar. (#448 and many, many other PRs)
  • v4.0.0-rc1

    November 19, 2018
  • v3.1.0

    October 01, 2017
    • πŸ“¦ [FIX] Reduced packages required when referencing from NET45 and NET46. (#331)
    • ⚑️ [UPDATE] Reintroduced support for NET45. (#329)
    • πŸ‘ [NEW] Support for auto-substituting ValueTask<T> results. Thanks to @KrzysztofBranicki for this change. (#325)
  • v3.0.1

    October 01, 2017
    • πŸš€ [FIX] Signing 3.x release to prevent problems with other packages that work with different versions of NSubstitute. Thanks Alex Povar for raising this. (#324)
    • ⚑️ [UPDATE] Readme and other docs converted to markdown (.md) rather than plain text. Thanks to Stefan Kert for this PR.
  • v3.0.0

    October 01, 2017
    • ⚠ [FIX] Fixed warning about System.ComponentModel.TypeConverter 4.0.1 (#311). Thanks to Stefan Kert for this PR.
    • ⚑️ [UPDATE] [BREAKING] Migrated to new csproj format, targeting .NET Standard 1.3. ⬇️ Dropped support for older .NET platforms (pre-.NET46). Uses NuGet for dependencies rather than shipping them ilmerged. Thanks to Alexandr Nikitin for this work. Also thanks to @StefanKert and @robertcoltheart for review feedback.
    • ⚑️ [UPDATE] Stopped shipping ZIP distribution, now exclusively using NuGet. (#319)
    • πŸ“š [UPDATE] Stopped shipping documentation with the NuGet package. This information is available in the source repository. (#319)
  • v2.0.3

    April 01, 2017
    • πŸ›  [FIX] Fixed issue with stubbing multiple return values and then accessing them in parallel. (#282, #294). Thanks to Janusz BiaΕ‚obrzewski (@jbialobr) for implementing this, and to Alexandr Nikitin and Alex Povar for reviewing and contributing to Janusz' PR.
    • ⚑️ [UPDATE] .NET Core build now targets netstandard-1.3 (was 1.5). Thanks to Ian Johnson (@ipjohnson) for this change. (#303)
    • ⚑️ [UPDATE] .NET Core build is now signed, which removes a warning when referencing .NET standard library. Thanks to Connie Yau (@conniey) for this change. (#302)
    • 🚚 [FIX] Removed redundant .NET standard dependencies when referencing NSubstitute as a .NET Framework library. Thanks to Alex Povar (@zvirja). (#295)