Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump NSubstitute from 5.1.0 to 5.3.0 #88

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 4, 2024

Bumps NSubstitute from 5.1.0 to 5.3.0.

Release notes

Sourced from NSubstitute's releases.

v5.3.0

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: nsubstitute/NSubstitute@v5.2.0...v5.3.0

v5.2.0

⚠️ 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:

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:

... (truncated)

Changelog

Sourced from NSubstitute's changelog.

5.3.0 (October 2024)

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

5.2.0 (Apr 2024; tagged but not released to nuget)

Many thanks to @​alexandrnikitin, @​Romfos, @​brad, and @​304NotModified for their contributions!

Commits
  • 45e00e3 Prep 5.3.0 release (#836)
  • cc73901 Release build workflow (#797)
  • 4d258a2 Feature: Enable call forwarding and substitution for non virtual methods or...
  • b8b0184 Added csharp_style_prefer_primary_constructors into editorconfig (#819)
  • 73818a6 Unable to match arguments whose type is generic, when their concrete type is ...
  • da82bc5 Merge pull request #813 from mihnea-radulescu/bug/issue-788-Raise-EventWith-d...
  • 2ce4d66 Replaced Obsolete attributes in WhenCalled<T> with doc comments.
  • 0c0d798 When(...).Throws gives a CouldNotSetReturnDueToNoLastCallException (#803)
  • 4bd429e Updated event raising logic to only allow internal default constructors
  • ee276f3 Merge branch 'main' into bug/issue-788-Raise-EventWith-default-constructor
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

Dependabot will merge this PR once CI passes on it, as requested by @guibranco.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Summary by Sourcery

Bump NSubstitute from version 5.1.0 to 5.3.0, introducing new features like Substitute.ForTypeForwardingTo, enhancing event handling, and improving method clarity with When(...).Throws. Fix issues with argument matching and update the project to use .NET 8 and C# 12 features. Update documentation to reflect these changes.

New Features:

  • Introduce Substitute.ForTypeForwardingTo to create substitutes that forward interceptable calls to a concrete class, enabling easier implementation of test spies over existing types.
  • Add support for Raise.EventWith default constructor to enhance event handling in tests.
  • Implement When(...).Throws to provide a clearer alternative to the Throw method.

Bug Fixes:

  • Fix Arg.Any() to correctly match arguments passed by reference.
  • Support matching arguments whose type is generic when their concrete type is not known.

Enhancements:

  • Migrate from NUnit 3 to NUnit 4 to leverage new testing features.
  • Update build project to .NET 8 for improved performance and compatibility.
  • Adopt C# 12 collection literals and primary constructors for cleaner code style.

Documentation:

  • Add documentation for Throws method to clarify its usage.
  • Remove Visual Studio for Mac from the readme to reflect current support.

Bumps [NSubstitute](https://github.com/nsubstitute/NSubstitute) from 5.1.0 to 5.3.0.
- [Release notes](https://github.com/nsubstitute/NSubstitute/releases)
- [Changelog](https://github.com/nsubstitute/NSubstitute/blob/main/CHANGELOG.md)
- [Commits](nsubstitute/NSubstitute@v5.1.0...v5.3.0)

---
updated-dependencies:
- dependency-name: NSubstitute
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot requested a review from guibranco November 4, 2024 09:51
Copy link
Contributor Author

dependabot bot commented on behalf of github Nov 4, 2024

The following labels could not be found: nuget, packages, .NET, dependencies.

Copy link

korbit-ai bot commented Nov 4, 2024

By default, I don't review pull requests opened by bots. If you would like me to review this pull request anyway, you can request a review via the /korbit-review command in a comment.

Copy link

Review changes with  SemanticDiff

Copy link

sourcery-ai bot commented Nov 4, 2024

Reviewer's Guide by Sourcery

This PR updates the NSubstitute package from version 5.1.0 to 5.3.0. The update includes several new features, bug fixes, and technical improvements to the mocking framework. The changes are primarily focused on enhancing the testing capabilities and modernizing the codebase.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Package version update in project dependencies
  • Updated NSubstitute from version 5.1.0 to 5.3.0
Tests/POCPolymorphicRestApi.Tests/POCPolymorphicRestApi.Tests.csproj
New features and improvements in NSubstitute 5.3.0
  • Added Substitute.ForTypeForwardingTo for creating test spies over existing types
  • Added support for Raise.EventWith default constructor
  • Implemented When(...).Throws to improve exception throwing syntax
  • Fixed Arg.Any() matching for reference arguments
  • Improved support for generic argument type matching
Tests/POCPolymorphicRestApi.Tests/POCPolymorphicRestApi.Tests.csproj

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

pr-code-reviewer bot commented Nov 4, 2024

👋 Hi there!

Everything looks good!


Automatically generated with the help of gpt-3.5-turbo.
Feedback? Please don't hesitate to drop me an email at [email protected].

Copy link

Potential issues, bugs, and flaws that can introduce unwanted behavior.

  1. /Tests/POCPolymorphicRestApi.Tests/POCPolymorphicRestApi.Tests.csproj - Upgrading from NSubstitute version 5.1.0 to 5.3.0 may introduce breaking changes if the new version has modifications in functionality that are not compatible with existing tests. It’s crucial to validate that the tests continue to pass after this upgrade.

Code suggestions and improvements for better exception handling, logic, standardization, and consistency (without impeding code quality).

  1. /Tests/POCPolymorphicRestApi.Tests/POCPolymorphicRestApi.Tests.csproj - Consider validating your testing framework compatibility with the upgraded NSubstitute version to ensure that there are no issues with how mocks are setup or tear-down during tests. This would involve reviewing the change log for NSubstitute 5.3.0 and running existing tests to confirm their effectiveness post-upgrade.

Copy link

coderabbitai bot commented Nov 4, 2024

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

gooroo-dev bot commented Nov 4, 2024

Please double check the following review of the pull request:

Issues counts

🐞Mistake 🤪Typo 🚨Security 🚀Performance 💪Best Practices 📖Readability ❓Others
0 0 0 0 0 0 0

Changes in the diff

  • 🛠️ No changes in the code were detected in the diff.

Identified Issues

No issues were identified because there are no changes in the diff.

Explanation and Fixes

Since there are no changes in the diff, there are no issues to explain or fix.

Missing Tests

No new tests are necessary as there are no changes in the diff.

Summon me to re-review when updated! Yours, Gooroo.dev
React or reply to share your feedback with me!

Copy link

instapr bot commented Nov 4, 2024

Feedback on PR

  • ✅ NSubstitute version bumped from 5.1.0 to 5.3.0
  • ⚠️ Ensure tests pass with the updated dependency.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have skipped reviewing this pull request. It seems to have been created by a bot (hey, dependabot[bot]!). We assume it knows what it's doing!

@github-actions github-actions bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 4, 2024
@guibranco guibranco enabled auto-merge (squash) November 4, 2024 09:51
@gstraccini gstraccini bot added the ☑️ auto-merge Automatic merging of pull requests (gstraccini-bot) label Nov 4, 2024
Copy link
Member

@guibranco guibranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automatically approved by gstraccini[bot]

@gstraccini gstraccini bot added the 🤖 bot Automated processes or integrations label Nov 4, 2024
@guibranco
Copy link
Member

@dependabot squash and merge

Copy link

github-actions bot commented Nov 4, 2024

Infisical secrets check: ✅ No secrets leaked!

Scan results:

9:51AM INF scanning for exposed secrets...
9:51AM INF 84 commits scanned.
9:51AM INF scan completed in 71.8ms
9:51AM INF no leaks found

Copy link

sonarqubecloud bot commented Nov 4, 2024

@guibranco guibranco merged commit 1db97ee into main Nov 4, 2024
23 checks passed
@guibranco guibranco deleted the dependabot/nuget/NSubstitute-5.3.0 branch November 4, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☑️ auto-merge Automatic merging of pull requests (gstraccini-bot) 🤖 bot Automated processes or integrations size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant